Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace RenderPanel::sendMouseMoveEvent by using QWidget::setMouseTracking #1175

Closed
simonschmeisser opened this issue Dec 4, 2017 · 2 comments

Comments

@simonschmeisser
Copy link
Contributor

connect( fake_mouse_move_event_timer_, SIGNAL( timeout() ), this, SLOT( sendMouseMoveEvent() ));

uses a timer (33ms!) to fake receiving mouse move events when there is no button pressed (for interactive markers for example). Is there a reason why we are not setting QWidget::setMouseTracking
http://doc.qt.io/qt-5/qwidget.html#mouseTracking-prop ?

I'll open a PR later if no one remembers why it is done this way

@dhood
Copy link
Contributor

dhood commented Dec 20, 2017

At first I wondered it if was a new addition to qt but it looks like it was available in at the time of the commit. This approach might be appropriate if we were trying to limit the callback frequency or something, but at 30Hz it doesn't look like the case 😄. So it seems safe to me to swap to using setMouseTracking(true) (unless @hersh happens to remember a reason why it wasn't appropriate, but we're going back quite some years now).

Perhaps the reason will reveal itself if/when you give it a shot @simonschmeisser 😉

@dhood dhood added this to the untargeted milestone Dec 20, 2017
@wjwwood wjwwood removed this from the untargeted milestone May 10, 2018
@rhaschke
Copy link
Contributor

@simonschmeisser, could you provide a PR for this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants