QCombobox scrolling in touchscreen device
-
This post is deleted!
-
Hi,
The drop down from QComboBox is a QAbstractItemView which inherits from QAbstractScrollArea. You can try to apply flickcharm on it.
Hope it helps
-
@SGaist
Although the original posting was deleted and nobody knows what the exact problem was or what the opener already tried, this solution worked for me:QScroller::grabGesture(ui->combo->view()->viewport(),QScroller::LeftMouseButtonGesture);
The scrollarea of the combobox can be scrolled with one finger on touch devices or using a touchpad/mouse with leftclick+mousemove
-
Thank you @the_ it's work fine i know it's been a long time for this question but i hope i got answer
QScroller::grabGesture(ui->combo->view()->viewport(),QScroller::LeftMouseButtonGesture);
but it's very fast i mean if i have a comobox that contain for example 1000 number from 1 to 1000
it scroll very fast when i scroll down it get to the end if i want to scroll up it go to the first how can i move slowly i do that in QListWidgetui->listWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
so i can move on all items in the list
it there any way to do it on QComboBox
Thank you