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.
私はそれを囲むいくつかのドキュメントウィジェットを持つ中央のウィジェットを持っています。非表示にすると、ドキュメントのサイズが変更されてスペースがいっぱいになりますが、中央のウィジェットを表示すると、デフォルトのサイズで表示されます。非表示になる前と同じようにサイズ変更して配置できるようにしたい。
非表示にする前に、次のようにします。
QSize storedSize = mainwindow->getCentralWidget->size();
(あなたが話している中央のウィジェットを含むとmainwindow仮定します)* QMainWindow
mainwindow
* QMainWindow
元のサイズに戻したい場合:
mainwindow->getCentralWidget->resize(storedSize);