You want the default implementation to work? Then you need to call the inherited wheelEvent, when you don't handle the event yourself.
HIH
Joh
You want the default implementation to work? Then you need to call the inherited wheelEvent, when you don't handle the event yourself.
HIH
Joh
Thanks for the reply.
How do i call the default wheelevent? Isn't it called automatically when i move the mouse wheel?
You need to call the base class implementation. Otherwise you are overriding its functionality. Your GraphWidget inherits from QGraphicsView?
Then it would look like this:
HIHQt Code:
{ if (event->modifiers().testFlag(Qt::ControlModifier)) { scaleView(pow((double)2, -event->delta() / 240.0)); } else { } }To copy to clipboard, switch view to plain text mode
Johannes
penny (7th April 2011)
Thank you so much!! It works properly now..
Bookmarks