Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top