QScrollBar: handle QWheelEvent::Phase for transient scrollbars
Transient scrollbars should become and stay visible when touching the pad with two fingers. Change-Id: Ic36ba56019f484cedb2404550551ebe68ea6f285 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
73251f22f3
commit
865b43dbf3
@ -510,6 +510,11 @@ void QScrollBar::wheelEvent(QWheelEvent *event)
|
||||
Q_D(QScrollBar);
|
||||
if (d->scrollByDelta(event->orientation(), event->modifiers(), delta))
|
||||
event->accept();
|
||||
|
||||
if (event->phase() == QWheelEvent::Started)
|
||||
d->setTransient(false);
|
||||
else if (event->phase() == QWheelEvent::Ended)
|
||||
d->setTransient(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user