[Qt-interest] QWidget::setWindowFlags(Qt::Dialog) isn't working.

Zeljko zeljko at holobit.net
Tue Mar 31 14:37:50 CEST 2009


Gonen K wrote:

> Hello.
> When I use setWindowFlags(Qt::Dialog) on my program's main window, it just
> adds a "Help" option in the window's title bar instead of canceling the
> maximize/minimize option.
> According to the docs, if the Qt::Dialog parameter should cancel the
> maximize/minimize option in the window's title bar, but as I said, when I
> use it - it just adds a "Help" option.
> 
> Does anyone know what to do?

I've found that if you assign parent (in constructor) to such widget
(QtDialog) then min button is invisible (eg. QMessageBox), but creating
QMessageBox without parent adds min & help button (Linux XOrg-6.8.2).
But ,also you must know that min/max/help buttons heavily depends on WM
under linux.
I don't know what shoud be assigned as parent of QMainWindow in your
case ... QDesktopWidget ? :)

z.



More information about the Qt-interest-old mailing list