[SOLVED] Prevent users from moving Icons in QListWidget (IconMode)
-
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?
-
Without trying it, just from the docu I would try
@
setMovement(QListView::Static)
@ -
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.