Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
18 votes
1 answer
10k views

Qt MouseMoveEvent only triggers with a mouse button press

I have an odd problem here. I'm working on an application, and within one of my classes I'm monitoring my mouse events. The weird thing is, my mouse move event will only get called if any mouse ...
Yattabyte's user avatar
  • 1,480
0 votes
1 answer
156 views

An issue when rendering a line depending on Mouse position

I have an openGL widget, where I want to render a line which is dependent of mouse positions, as follows: glPushMatrix(); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, ...
Mike's user avatar
  • 533
1 vote
1 answer
29k views

Mouse events in Qt

I have 3 events defined as follows: void mouseMoveEvent(QMouseEvent *eventMove); void mousePressEvent(QMouseEvent *eventPress); void mouseReleaseEvent(QMouseEvent *releaseEvent); Now, let's say I ...
Mike's user avatar
  • 533
3 votes
1 answer
7k views

Getting mouse coordinates Qt OpenGL

I have an openGL widget and know that I can get the coordinates of my mouse as follows: X = this->mapFromGlobal(QCursor::pos()).x(); Y = this->mapFromGlobal(QCursor::pos()).y(); Lets imagine ...
Mike's user avatar
  • 533
0 votes
2 answers
1k views

Following a QWidget while moving

I am trying to make a QWidget follow another one while this is moving. In particular, I have a QMainWindow with a button. This button shows a QWidget, the "follower". Now I'd like the follower to ...
senseiwa's user avatar
  • 2,479
1 vote
1 answer
6k views

Qt: MouseMove not functioning

In my Qt application, I need to track mouse movement. For that, I created an eventfilter and I installed it correctly as this: bool iArmMainWindow::eventFilter(QObject *obj, QEvent *event) { if (...
user avatar