[SOLVED] Prevent users from moving Icons in QListWidget (IconMode)
General and Desktop
3
Posts
2
Posters
3.5k
Views
1
Watching
-
wrote on 18 May 2013, 20:43 last edited by
I have a QListWidget with icon mode enabled:
@setViewMode(QListView::IconMode);
setResizeMode(QListWidget::ResizeMode::Adjust);
setEditTriggers(QAbstractItemView::NoEditTriggers);
@!http://i.imgur.com/2YAGNOn.png(QListWidget IconMode)!
However, I am still able to move and rearrange the icons. I would like to prevent this. I thought "NoEditTriggers" would solve the problem, but it appears not.
Any suggestions?
-
wrote on 19 May 2013, 11:43 last edited by
Without trying it, just from the docu I would try
@
setMovement(QListView::Static)
@ -
wrote on 19 May 2013, 18:45 last edited by
Thanks, that solved it!
I was begin fearing I would have to do something crazy, like installing an EventFilter. Perhaps I should look through the documentation more carefully next time.
1/3