forked from M-Labs/artiq
1
0
Fork 0

gui: workaround for Qt failing to embed applets in hidden and detached QDockWidgets

This commit is contained in:
Sebastien Bourdeauducq 2016-02-19 18:13:25 +01:00
parent 5f5427f51f
commit 3b81dd5adc
1 changed files with 5 additions and 0 deletions

View File

@ -144,6 +144,11 @@ def main():
main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, d_explorer) main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, d_explorer)
# load/initialize state # load/initialize state
if os.name == "nt":
# HACK: show the main window before creating applets.
# Otherwise, the windows of those applets that are in detached
# QDockWidgets fail to be embedded.
main_window.show()
smgr.load() smgr.load()
smgr.start() smgr.start()
atexit_register_coroutine(smgr.stop) atexit_register_coroutine(smgr.stop)