how to handel multiple touch event on Qscroller ?
-
i have used grab gesture function for scrolling menu items.
when i scroll and hold gesture at same time i am able to click on back ground of scroller. how to disable that click?
-
below code helped me to avoid multi touch while scroll
QScrollerProperties qScrollerProperties;
QVariant overshootPolicy = QVariant::fromValueQScrollerProperties::OvershootPolicy(QScrollerProperties::OvershootAlwaysOff);
qScrollerProperties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, overshootPolicy);
QScroller* qScroller = QScroller::scroller(ui->treeWidgetSession);
qScroller->grabGesture(ui->treeWidgetSession, QScroller::LeftMouseButtonGesture);
qScroller->setScrollerProperties(qScrollerProperties); -
Hi
Do you mean to make QMneu stay open even if clicked ? -
i mean to say how to stop QScroller hold and click event at same time
-
below code helped me to avoid multi touch while scroll
QScrollerProperties qScrollerProperties;
QVariant overshootPolicy = QVariant::fromValueQScrollerProperties::OvershootPolicy(QScrollerProperties::OvershootAlwaysOff);
qScrollerProperties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, overshootPolicy);
QScroller* qScroller = QScroller::scroller(ui->treeWidgetSession);
qScroller->grabGesture(ui->treeWidgetSession, QScroller::LeftMouseButtonGesture);
qScroller->setScrollerProperties(qScrollerProperties);