Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コンストラクターで次のコードを使用して、QDialog に最小化ボタンを追加しようとしています。
Qt::WindowFlags flags = windowFlags(); flags |= Qt::WindowMinMaxButtonsHint; setWindowFlags(flags);
Windows では動作しますが、Linux では動作しません。
その遅い答えですが、他の人に役立つ可能性があります。私は同じ問題を抱えていて、次のように修正しました。
Qt::WindowFlags flags = Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint; this->setWindowFlags(flags);
オーバーライドされたダイアログ コンストラクター内。