qt docking window,
Members - Reputation: 122
Posted 27 April 2008 - 12:03 PM
Members - Reputation: 486
Posted 28 April 2008 - 06:15 AM
Moving on, you shouldn't segfault for not connecting a signal. Furthermore, the docking window should go away automatically when the parent is closed. That's part of Qt's hierarchy.
What I'm guessing may be your issue is being unaware of Qt's memory management. Qt main windows don't automatically clean up, so general suggestion is to put them on the stack. However, all other Qt widgets that are parented do clean up, so generally put them on the heap and Qt will do the cleanup behind the scenes. Your issue may be more related to something of that flavor. I know it threw me off at first that Qt was actually automatically cleaning up and deallocating the other widgets that were no longer used.
Finally, one other tip that QDockWidgets only work properly, in my experience, when the parent is a QMainWindow (or derivative). This is another thing that threw me off at first.
Let me know if that helps. If not, clarify what issues you're having and I'll see what else I can advise.