0

I have a main window (QMainWindow) containing a dock-able section (QDockWidget). The dock-able section can be torn off and used as a floating window. I would like to be able to allow the user to tear off the dock-able section, close the main window and continue to use the dock-able section as a standalone thing. I assume my design is part of the problem so I should explain the purpose of the GUI.

Basically the main window is used to create processes that perform various tasks. Each time a process (QThread) is created it is displayed in the dock-able section. Once the user has finished creating processes he/she is finished with the main window but may want to keep the dock-able section open as many of the processes could still be waiting in a queue. Make sense? If so, how can I close the main window without closing the dock-able section? Or am I trying to go about this the wrong way?

Cheers

Yani
  • 1,465
  • 2
  • 16
  • 25

1 Answers1

0

IMHO, the dock section in your layout is a child of main window, so if you're closing\hiding main window, it's children will be hidden\destroyed. Maybe you should spawn a new completely separate and independent window and use that?

AlexVhr
  • 2,014
  • 1
  • 20
  • 30