With QGLwidget: =============== Qt 5.12.3 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.4.0) () setParent QWidget(0x564c87cecc50) QToolBar(0x564c87cec080) QFlags(Widget) setParent_sys QToolBar(0x564c87cec080) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87d26360) QToolBarExtension(0x564c87cecc50, name="qt_toolbar_ext_button") QFlags(Popup) setParent_sys QToolBarExtension(0x564c87cecc50, name="qt_toolbar_ext_button") QFlags(Popup) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QToolBar(0x564c87cec080, name="ToolBar") MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) ~QWidget QWidget(0x564c87d26360) setParent QWidget(0x564c87d26360) QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87cf1d50) QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87cec8e0) QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x564c87cec080, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87d27b60) MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(Widget) setParent_sys MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87d20170) QDockWidget(0x564c87d27b60) QFlags(Widget) setParent_sys QDockWidget(0x564c87d27b60) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x564c87d285a0) QDockWidget(0x564c87d27b60) QFlags(Widget) setParent_sys QDockWidget(0x564c87d27b60) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QDockWidget(0x564c87d27b60, name="Dock") MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(Tool|FramelessWindowHint) setParent_sys MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(Tool|FramelessWindowHint) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) QWindow QWindow(0x564c87cf7310) QWindow(0x0) updateObjectName QWidgetWindow(0x564c87cf7310) "MainWindow" QWindow QWindow(0x564c87e64d30) QWindow(0x0) updateObjectName QWidgetWindow(0x564c87e64d30) "DockWindow" setTransientParent QWidgetWindow(0x564c87e64d30, name="DockWindow") QWidgetWindow(0x564c87cf7310, name="MainWindow") setParent QWidgetWindow(0x564c87e64d30, name="DockWindow") QWindow(0x0) setParent QWidget(0x564c87f85160) QDockWidget(0x564c87d27b60, name="Dock") QFlags(Widget) setParent_sys QDockWidget(0x564c87d27b60, name="Dock") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) QWindow QWindow(0x564c87e79960) QWindow(0x0) updateObjectName QWidgetWindow(0x564c87e79960) "QWidgetClassWindow" setParent QWidget(0x564c87f845f0) QGroupBox(0x564c87f85160, name="Container") QFlags(MSWindowsOwnDC) setParent_sys QGroupBox(0x564c87f85160, name="Container") QFlags(MSWindowsOwnDC) setParent_sys wasCreated= false windowHandle()= QWidgetWindow(0x564c87e79960, name="QWidgetClassWindow") setParent_sys parentWithWindow= QDockWidget(0x564c87d27b60, name="Dock") setTransientParent QWidgetWindow(0x564c87e79960, name="QWidgetClassWindow") QWindow(0x0) setParent QWidgetWindow(0x564c87e79960, name="QWidgetClassWindow") QWidgetWindow(0x564c87e64d30, name="DockWindow") updateObjectName QWidgetWindow(0x564c87e79960, name="QWidgetClassWindow") "GLWidgetWindow" QWindow QWindow(0x7f28d40089b0) QWindow(0x0) updateObjectName QWidgetWindow(0x7f28d40089b0) "QWidgetClassWindow" updateObjectName QWidgetWindow(0x7f28d40089b0, name="QWidgetClassWindow") "desktopWindow" QWindow QWindow(0x564c87f59730) QWindow(0x0) updateObjectName QWidgetWindow(0x564c87f59730) "QWidgetClassWindow" >crash crash About to setCentralWidget() setParent QGroupBox(0x564c87f85160, name="Container") MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys MainWindow(0x7ffe16ecb1a0, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys wasCreated= true windowHandle()= QWindow(0x0) <--------------------------- crash About to m_container->show() crash About to delete m_dockWidget ~QWidget QWidget(0x564c87d27b60, name="Dock") ~QWidget QWidget(0x564c87d20170, name="qt_dockwidget_floatbutton") ~QWidget QWidget(0x564c87d285a0, name="qt_dockwidget_closebutton") ~QWindow QWindow(0x564c87e64d30, name="DockWindow") ~QWindow QWindow(0x564c87e79960, name="GLWidgetWindow") crash About to delete m_glWidget ~QWidget QWidget(0x564c87f845f0, name="GLWidget") With a native QLabel with winId() enforced ========================================== Qt 5.12.3 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.4.0) ("-L") setParent QWidget(0x563019a19da0) QToolBar(0x563019a170d0) QFlags(Widget) setParent_sys QToolBar(0x563019a170d0) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a0d0e0) QToolBarExtension(0x563019a19da0, name="qt_toolbar_ext_button") QFlags(Popup) setParent_sys QToolBarExtension(0x563019a19da0, name="qt_toolbar_ext_button") QFlags(Popup) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QToolBar(0x563019a170d0, name="ToolBar") MainWindow(0x7ffed3574930, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys MainWindow(0x7ffed3574930, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) ~QWidget QWidget(0x563019a0d0e0) setParent QWidget(0x563019a0d0e0) QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a1c250) QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a179c0) QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys QToolBar(0x563019a170d0, name="ToolBar") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a1b2f0) MainWindow(0x7ffed3574930, name="Main") QFlags(Widget) setParent_sys MainWindow(0x7ffed3574930, name="Main") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a4b8d0) QDockWidget(0x563019a1b2f0) QFlags(Widget) setParent_sys QDockWidget(0x563019a1b2f0) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019a53bc0) QDockWidget(0x563019a1b2f0) QFlags(Widget) setParent_sys QDockWidget(0x563019a1b2f0) QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QDockWidget(0x563019a1b2f0, name="Dock") MainWindow(0x7ffed3574930, name="Main") QFlags(Tool|FramelessWindowHint) setParent_sys MainWindow(0x7ffed3574930, name="Main") QFlags(Tool|FramelessWindowHint) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) QWindow QWindow(0x563019a17da0) QWindow(0x0) updateObjectName QWidgetWindow(0x563019a17da0) "MainWindow" QWindow QWindow(0x563019b90090) QWindow(0x0) updateObjectName QWidgetWindow(0x563019b90090) "DockWindow" setTransientParent QWidgetWindow(0x563019b90090, name="DockWindow") QWidgetWindow(0x563019a17da0, name="MainWindow") setParent QWidgetWindow(0x563019b90090, name="DockWindow") QWindow(0x0) setParent QWidget(0x563019cb3070) QDockWidget(0x563019a1b2f0, name="Dock") QFlags(Widget) setParent_sys QDockWidget(0x563019a1b2f0, name="Dock") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) setParent QWidget(0x563019bfffb0) QGroupBox(0x563019cb3070, name="Container") QFlags(Widget) setParent_sys QGroupBox(0x563019cb3070, name="Container") QFlags(Widget) setParent_sys wasCreated= false windowHandle()= QWindow(0x0) QWindow QWindow(0x563019bc7c20) QWindow(0x0) updateObjectName QWidgetWindow(0x563019bc7c20) "LabelWindow" QWindow QWindow(0x563019c6d5e0) QWindow(0x0) updateObjectName QWidgetWindow(0x563019c6d5e0) "ContainerWindow" QWindow QWindow(0x563019caee20) QWindow(0x0) updateObjectName QWidgetWindow(0x563019caee20) "qt_dockwidget_floatbuttonWindow" QWindow QWindow(0x563019bc9b00) QWindow(0x0) updateObjectName QWidgetWindow(0x563019bc9b00) "ToolBarWindow" setTransientParent QWidgetWindow(0x563019caee20, name="qt_dockwidget_floatbuttonWindow") QWindow(0x0) setParent QWidgetWindow(0x563019caee20, name="qt_dockwidget_floatbuttonWindow") QWidgetWindow(0x563019b90090, name="DockWindow") setTransientParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWindow(0x0) setParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWidgetWindow(0x563019b90090, name="DockWindow") setTransientParent QWidgetWindow(0x563019bc7c20, name="LabelWindow") QWindow(0x0) setParent QWidgetWindow(0x563019bc7c20, name="LabelWindow") QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") XX setParent QWidgetWindow(0x563019bc7c20, name="LabelWindow") QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") XX QWindow QWindow(0x563019cb4e80) QWindow(0x0) updateObjectName QWidgetWindow(0x563019cb4e80) "qt_dockwidget_closebuttonWindow" setTransientParent QWidgetWindow(0x563019cb4e80, name="qt_dockwidget_closebuttonWindow") QWindow(0x0) setParent QWidgetWindow(0x563019cb4e80, name="qt_dockwidget_closebuttonWindow") QWidgetWindow(0x563019b90090, name="DockWindow") QLabel(0x563019bfffb0, name="Label") 0x4c00017 setTransientParent QWidgetWindow(0x563019bc9b00, name="ToolBarWindow") QWindow(0x0) setParent QWidgetWindow(0x563019bc9b00, name="ToolBarWindow") QWidgetWindow(0x563019a17da0, name="MainWindow") QWindow QWindow(0x7f3f98009b50) QWindow(0x0) updateObjectName QWidgetWindow(0x7f3f98009b50) "QWidgetClassWindow" updateObjectName QWidgetWindow(0x7f3f98009b50, name="QWidgetClassWindow") "desktopWindow" QWindow QWindow(0x563019c94db0) QWindow(0x0) updateObjectName QWidgetWindow(0x563019c94db0) "QWidgetClassWindow" >crash crash About to setCentralWidget() setParent QGroupBox(0x563019cb3070, name="Container") MainWindow(0x7ffed3574930, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys MainWindow(0x7ffed3574930, name="Main") QFlags(WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint) setParent_sys wasCreated= true windowHandle()=QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") <--------------------------- setParent_sys parentWithWindow= MainWindow(0x7ffed3574930, name="Main") setTransientParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWindow(0x0) setParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWidgetWindow(0x563019a17da0, name="MainWindow") setTransientParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWindow(0x0) setParent QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") QWidgetWindow(0x563019a17da0, name="MainWindow") setParent QWidgetWindow(0x563019bc7c20, name="LabelWindow") QWidgetWindow(0x563019c6d5e0, name="ContainerWindow") XX crash About to m_container->show() crash About to delete m_dockWidget ~QWidget QWidget(0x563019a1b2f0, name="Dock") ~QWidget QWidget(0x563019a4b8d0, name="qt_dockwidget_floatbutton") ~QWindow QWindow(0x563019caee20, name="qt_dockwidget_floatbuttonWindow") ~QWidget QWidget(0x563019a53bc0, name="qt_dockwidget_closebutton") ~QWindow QWindow(0x563019cb4e80, name="qt_dockwidget_closebuttonWindow") ~QWindow QWindow(0x563019b90090, name="DockWindow") crash About to delete m_glWidget ~QWidget QWidget(0x563019bfffb0, name="Label") ~QWindow QWindow(0x563019bc7c20, name="LabelWindow")