How to disable items selected in Qtreeview
-
I am adding a row in Qtreeview and I have to disable pop up menu on that row in Qtreeview . Can some one guide me on that
-
@TobbY said in How to disable items selected in Qtreeview:
OnDoubleClick
I am asking for conditions which flags to set to disable a QTreeview item
-
@TobbY said in How to disable items selected in Qtreeview:
OnDoubleClick
I am asking for conditions which flags to set to disable a QTreeview item
@Qt-Enthusiast
What "pop up menu on that row"? Do you have a custom right-click menu? -
I want one row on QTreeView to be which cannot be selected and Right click on it
-
I want one row on QTreeView to be which cannot be selected and Right click on it
Hi
Pr item , you can disable
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
If using a model, you can control from its Flags function
http://doc.qt.io//qt-5/qstandarditemmodel.html#flags