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.
以前は設定を保存してcloseEventいましたが、ウィンドウを閉じるとその関数も呼び出されるため、少し欠陥があることがわかりました。(私のアプリにはシステムトレイがあり、システムトレイ機能に非表示になっています)
closeEvent
では、QSettingsを使用して設定を保存する必要があるのはいつですか?これを破壊関数で呼び出すべきではありませんよね?
デストラクタでQSettingsを使用することは間違いなく問題ありません。私は何年もそれをしてきましたが、何の問題もありませんでした。