Selecting Item and Scrolling ListWidget Area Problem
-
wrote on 28 Apr 2014, 15:07 last edited by
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
-
wrote on 28 Apr 2014, 17:06 last edited by
Hi,
I have tried all of the modes, however it is not the solution or I could not.
Thank you.
-
Hi and welcome to devnet,
Have a look at setSelectionMode and ExtendedSelection
-
wrote on 29 Apr 2014, 06:58 last edited by
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.
-
wrote on 29 Apr 2014, 13:41 last edited by
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
-
wrote on 2 May 2014, 10:29 last edited by
Yes.
Should I do this with code handling or a QListWidget method?
-
Have a look at the mouseXXXEvent methods
-
wrote on 5 May 2014, 11:45 last edited by
Ok,
Thank you for your help...
12/12