문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top