PDA

View Full Version : QTreeWidget



chris_helloworld
17th June 2010, 14:16
Is this a bug,
I want a tree with top level items not selectable, but with selectable children.

I insert a QTreeWidgetItem with flags set to Qt::NoItemFlags, because I do not want it to be selectable. I insert another item as a child with flags set to Qt::ItemIsEnabled | Qt::ItemIsSelectable, however this child is also not selectable.

This results in the child not being selectable whilst I believe it should be.

Thanks in advance,
Chris.

agathiyaa
17th June 2010, 17:42
May be you have to set Qt::ItemIsEnabled instead Qt::NoItemFlags for your top Level QTreeWidgetItem:).