PyQt Hide QDialogs Inside of QTreeWidget
I have a QTreeWidget with QComboBoxes inside of it. I would like 开发者_Python百科to be able to hide the combo boxes.
I am getting the QComboBox out of the tree using the itemWidget function. I have tried using setVisible(False) and hide() but neither work. Can anyone explain why this is the case and possibly offer a soultion?
I suspect it has something to do with the QTreeWidget or the QTreeWidgetItems controlling the visibility of its widgets.
Have you tried putting the QComboBoxes inside a layout inside a QWidget, and placing the QWidget in the QTreeWidget?
精彩评论