How to prevent QListWidget from itemdragging
Hello,
In the designer I set 'dragenabled' to false.
The help says:
"This property holds whether the view supports dragging of its own items."
Unfortunately I can still drag items...(target platform is Win32) how can I prevent my QListWidget from doing this?
Regards,
Arthur
Re: How to prevent QListWidget from itemdragging
Could you provide a minimal compilable example which reproduces the problem?
1 Attachment(s)
Re: How to prevent QListWidget from itemdragging
Re: How to prevent QListWidget from itemdragging
This example is far from being minimal :)
You can drag items because movement property of your listwidget is set to Snap. Try changing it to QListView::Static.
Re: How to prevent QListWidget from itemdragging
Sorry I couldn't 'isolate' the problem otherwise than just inserting my GUI file :p
Re: How to prevent QListWidget from itemdragging
Quote:
Originally Posted by Arthur
Sorry I couldn't 'isolate' the problem otherwise than just inserting my GUI file :p
The point of making a minimal example is that the author often finds and resolves the problem while trying to reproduce it. Another point is that it's easier for others to do anything with that example (modify it or whatever) and they don't have to read a bunch of code to understand it.
Re: How to prevent QListWidget from itemdragging
Ok, next time I'll behave ;-)
Changing it to QListView::Static worked by the way, thanks.