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.
我可以得到一行代码来保存 QLineedit 的文本并在重新启动应用程序时检索它吗?请帮忙,这对我的项目非常重要……</p>
//read QSettings settings("settingName"); QString aValue=settings.value("aKey").toString(); //write QSettings settings("settingName"); QString somevalue=textedit.text(); settings.setValue("aKey",somevalue);