Question

I'm trying to add a minimize button to my QDialog using this code in the constructor:

Qt::WindowFlags flags = windowFlags();
flags |= Qt::WindowMinMaxButtonsHint;
setWindowFlags(flags);

It's working on Windows but not on Linux.

Was it helpful?

Solution

Its a late answer but could be useful to others, I had the same problem and fixed like so:

Qt::WindowFlags flags = Qt::Window | Qt::WindowSystemMenuHint
                            | Qt::WindowMinimizeButtonHint
                            | Qt::WindowCloseButtonHint;
this->setWindowFlags(flags);

inside the overridden dialog constructor.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top