Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 10. Main Windows and Actions > QSettings: Saving and Restoring Applicat...

10.3. QSettings: Saving and Restoring Application State

Most desktop applications have a way for users to configure the settings. The settings/preferences/options need to be persistent. The mechanism for that is included with QSettings.

A QSettings must be initialized with an application name, organization name, and organization domain before it is used for the first time. This prevents settings from one application from accidentally overwriting those from another. If, however, the QApplication itself is set with this information, as shown in Example 10.7, the QSettings default constructor uses it.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial