开发者

Forms autosave question

开发者 https://www.devze.com 2023-02-25 02:27 出处:网络
I am making an application in c++ and qt and i am wondering how i can autosave my forms instead of pressing the save button everytime. Since i have never done it before,i am thinking autosave is only

I am making an application in c++ and qt and i am wondering how i can autosave my forms instead of pressing the save button everytime. Since i have never done it before,i am thinking autosave is only for the web.What is the b开发者_高级运维est way to approach this?.


You don't need to. A QTextBox will not lose its value suddenly, only when it's destroyed. And unless you arrange it otherwise, that doesn't happen before the destructor of the form finishes. So you can always get the textbox content, even from the destructor.

0

精彩评论

暂无评论...
验证码 换一张
取 消