Im trying to disable the close 'x' button, and I assumed that it would work by setting the DockWidgetFeature to only movable and floatable.
def CreateDockWidget (self):
Pane = QtGui.QDockWidget()
Pane.DockWidgetFeatures = QtGui.QDockWidget.DockWidgetFloatable | QtGui.QDockWidget.DockWidgetMovable;
Pane.setAllowedAreas( QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea )
textBox1 = QtGui.QTextEdit()
Pane.setWidget(textBox1 )
self.addDockWidget( QtCore.Qt.LeftDockWidgetArea, Pane )
Why doesn't the above work ? BTW, if I don't set floatable, it remains floatable until its undockable (floating) then I can't re-dock it. Why is that ?
thanks
You were right, but you didn't actually set the features of your DockWidget. Call
instead of erasing DockWidgetFeatures with the assignment and you should be fine!