7

I added (via drag and drop) a QDockWidget to my GUI that I was editing in Designer...
Now I want to remove it.

Firstly, I selected the visible object and pressed the Delete key.
The Object disappeared.

However, the QDockWidget can be seen to still be present in the Object Inspector,
and when I try to save my .ui, I get the message:

The container extension of the widget MainWindow (QMainWindow)
returned a widget not managed by Designer dockWidget (QDockWidget)
when queried for page #2. Container pages should only be added by
specifying them in XML returned by the domXml() method of the custom
widget.

Clicking on the Widget in the Object Inspector and hitting the Delete key does nothing,
and the right-click context menu does not have the usual 'Remove' option.
How do I get rid of it?! :|

Specs:

Windows 7 32 bit  
PyQt4
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
  • I'd appreciate a response ASAP. I can't save the GUI! – Anti Earth Oct 08 '11 at 13:41
  • I managed to reproduce a similar error, but it still saved the file despite the error message. Are you sure it's not being saved? – Chris Oct 08 '11 at 17:21
  • I didn't think it was, because after I tried to save it I compiled it to .py using pyuic4. The produced py file did not contain all my objects from the ui file, and caused errors. However, once I reopened that new .ui file in the Designer, the QDockWidgets had disappeared, and everything worked normally! :) Thanks for the response! – Anti Earth Oct 09 '11 at 02:00

1 Answers1

12

I also had this problem - dockable windows in the object inspector which I couldn't see in the main window. Because I couldn't see them, I couldn't find a way to delete them. However, when I saved the file, I ignored the warning messages (the same you had). When I reloaded the saved ui file, all the erroneous dock windows in the object inspector had disappeared.

Doug
  • 136
  • 1
  • 2
  • 1
    It's a happy ending all round :) I'm just going to choose this as an answer. It pretty much has the solution. – Anti Earth Oct 25 '11 at 02:39