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:
{
if (event->modifiers().testFlag(Qt::ControlModifier))
{
scaleView(pow((double)2, -event->delta() / 240.0));
} else {
}
}
void GraphWidget::wheelEvent(QWheelEvent *event)
{
if (event->modifiers().testFlag(Qt::ControlModifier))
{
scaleView(pow((double)2, -event->delta() / 240.0));
} else {
QGraphicsView::wheelEvent(event);
}
}
To copy to clipboard, switch view to plain text mode
HIH
Johannes
Bookmarks