I have a dialog with a big textbox. I want the user to be able to maximize the dialog. I already tried the following options (XML_Editor
is a QDialog
instance):
XML_Editor.setWindowFlags(QtCore.Qt.Window or QtCore.Qt.WindowMaximizeButtonHint)
-- shows the Maximize button but doesn't center the dialog w.r.t. the parent anymore
XML_Editor.setWindowFlags(QtCore.Qt.Dialog or QtCore.Qt.WindowMaximizeButtonHint or QtCore.Qt.CustomizeWindowHint)
-- no effect
Now my question is: How do I achieve that the Maximize button is shown and the dialog pops up centered w.r.t. the parent? Most resources on the web seem to focus on how to get rid of the Maximize button. Any ideas how to achieve the opposite?
The main target is Ubuntu 10.04 (default configuration), it would be great if it worked on Windows and Mac, too.
I appreciate any hint. Thanks in advance.