[Qt-interest] Maximize button for dialogs on Gnome / Metacity

Marian Ciobanu ciobi at inbox.com
Thu Jul 9 10:52:45 CEST 2009


Hi,


I know that Qt::WindowMaximizeButtonHint and its brothers are just hints, but I was wondering if anybody has some practical advice about getting a dialog to properly show a maximize button on Gnome + Metacity, more precisely Ubuntu 9.04 - default installation.

I tried various combinations, some that seem to make sense and some that don't, I got "interesting" results, but not what I wanted. Either the maximize button is shown but the "system" and "close" buttons get hidden (so you can't close the dialog with the mouse or with Alt-F4), or the dialog gets an additional taskbar entry instead of using its parent's, or some other things.

Since the dialogs are resizable and they can be made to show a maximize button (although then they do more than that), I think a "maximize" button should be visible, as it is in KDE / KWin by default or in Windows after properly setting the flags.

What seems quite strange is that once Qt::WindowMaximizeButtonHint is used, the close button gets hidden.

So, any ideas?



Here is what I got for some flag combinations:

Qt::Window - minimize, maximize, close; dialog gets its own taskbar entry

Qt::WindowTitleHint - close

Qt::Dialog - close

Qt::WindowTitleHint | Qt::WindowMaximizeButtonHint - nothing

Qt::Dialog | Qt::WindowMaximizeButtonHint - nothing

Qt::Window | Qt::WindowMaximizeButtonHint - maximize

Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint - maximize, minimize

Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint - nothing

Thanks




More information about the Qt-interest-old mailing list