Hello,
I'm looking for a way to integrate some code in my app to allow the app dialog to be maximized/Minimized.
What is the best way to do ?
Thanks
Cyril
Hello,
I'm looking for a way to integrate some code in my app to allow the app dialog to be maximized/Minimized.
What is the best way to do ?
Thanks
Cyril
HI,
I'have found a way which is working well for the tk-desktop.
def show_dialog(app_instance):
"""
Shows the main dialog window.
"""
# in order to handle UIs seamlessly, each toolkit engine has methods for launching
# different types of windows. By using these methods, your windows will be correctly
# decorated and handled in a consistent fashion by the system.
# we pass the dialog class to this method and leave the actual construction
# to be carried out by toolkit.
AppDialog = noteManager.noteManager.Example
app_instance.engine.show_dialog("My app", app_instance, AppDialog )
dialog = QtGui.QApplication.activeWindow()
flags = QtCore.Qt.Window
flags |= QtCore.Qt.WindowTitleHint
flags |= QtCore.Qt.WindowSystemMenuHint
flags |= QtCore.Qt.WindowMinimizeButtonHint
flags |= QtCore.Qt.WindowMaximizeButtonHint
flags |= QtCore.Qt.WindowCloseButtonHint
flags |= QtCore.Qt.WindowContextHelpButtonHint
flags |= QtCore.Qt.WindowShadeButtonHint
flags |= QtCore.Qt.WindowStaysOnTopHint
dialog.setWindowFlags(flags)
dialog.show()