Selecting Item and Scrolling ListWidget Area Problem
-
Hi,
For more readability use the "@""@" tag for your code.
As for you problem, have you tried this:
http://qt-project.org/doc/qt-5/qabstractitemview.html#selectionMode-prop
-
Hi and welcome to devnet,
Have a look at setSelectionMode and ExtendedSelection
-
Thank you sGaist,
I tried ExtendedSelection, but I need select only one item. I want to highlight only first pressed item if cursor on it until I release mouse button.
In other words, If I press mouse button on an item, I don't want hover effect on other items. -
What you are trying to do looks like the drag and drop functionality but without actually doing anything. It doesn't fit in any usual use case of that widget.
-
Yes, exactly.
Do you have any suggestion to do such a functionalty?
I see it on IOS apps, if Kinetic Scrolling not used.
On Android apps it is different. If you press on an item, app highlight that item, However if you move the cursor (or your finger on touch screens) without relesing, that item can not be selected again.
-
You would probably need to customize the mouse event handling by subclassing QListWidget
-
Have a look at the mouseXXXEvent methods