PDA

View Full Version : QTreeWidget And QItemDelegate



deepal_de
17th January 2012, 05:50
hi,
is it possible use a QItemDelegate with QTreeWidget??
I read somewhere even QTreeWidget is inherited from QTreeView using QItemDelegate is not possible..is this correct??
If someone has used QItemDelegate with QTreeWidget can you please post a simple example

Thanks

deepal_de
18th January 2012, 05:08
nobody uses ItemDelegate with QTreeWidget?? :(

ChrisW67
18th January 2012, 06:09
is it possible use a QItemDelegate with QTreeWidget??
Yes

I read somewhere even QTreeWidget is inherited from QTreeView using QItemDelegate is not possible..is this correct??
No, this is not correct. A five minute test program could have confirmed this for you.

If someone has used QItemDelegate with QTreeWidget can you please post a simple example

You use a QItemDelegate on a QTableWidget/QTreeWidget the same way you do with a QTableView/QTreeView. You will find simple examples in the documentation, specifically Delegate classes and Spin Box Delegate.