[Qt-interest] QTreeWidget->setItemWidget() works contrary to Qt documentation
Kishore Jonnalagadda
kitts.mailinglists at gmail.com
Mon Oct 10 20:00:57 CEST 2011
On Saturday 08 Oct 2011 3:16:00 PM Roland Tollenaar wrote:
> The documentation of Qt4.5.2 on QTreeWidgetItem::setItemWidget(..) reads:
>
> "Sets the given widget to be displayed in the cell specified by the
> given item and column.
>
> This function should only be used to display static content in the place
> of a tree widget item. If you want to display custom dynamic content or
> implement a custom editor widget, use QTreeView and subclass
> QItemDelegate instead."
>
> We have been adding Qlineedits and QtextEdits for editing to
> QtreeWidgetItems for years without problems.
I don't think those qualify as "dynamic". For "dynamic", imagine something
animated. Like an animated gif image in a QLabel or something.
> Spotting this now there is a concern that future versions of Qt (we
> might have to upgrade at some point) will break our code.
>
> Can anyone comment on this?
--
Cheers!
Kishore
More information about the Qt-interest-old
mailing list