PDA

View Full Version : Disable QTreeWidgetItem and not allowing to expand



chithara
26th September 2018, 10:38
Hi,

I am using a QTreeWidget in which I want to disable/ don't allow the user to expand the TreewidgetItem on certain cases. How can i achieve this?
item->SetDisabled(false) is not working anyhow.

d_stranz
26th September 2018, 17:26
QTreeWidgetItem::setDisabled() should have the value "true" if you do not want the user to be able to interact with it.

chithara
27th September 2018, 09:56
Sorry. I was setting the Value to "true" only, but even then i could able to expand the TreeItem.