how can i dynamically switch between use ItemDelegate and not use ItemDelegate ?
-
wrote on 31 Mar 2015, 06:25 last edited by
how can i dynamically switch between use ItemDelegate and not use ItemDelegate ?
when IconMode, i want to use ItemDeletgate.
while ListMode, i don't want to use ItemDelegate.i tried, when ListMode, setItemDelegate(NULL), but then paint nothing...
and i also tried in the inherited QAbstractItemDelegate class's paint, sizeHint. write return if Not IconMode.but also failed with nothing paint. -
Hi,
Either set/remove the delegate when you change the mode or write a delegate that you will configure to act as pass-trough when you change the mode.
1/2