[Qt-interest] Persist Application Wide Settings

Ross Bencina rossb-lists at audiomulch.com
Tue Oct 20 04:08:20 CEST 2009


Hi Willy

> Is there a way to automatically persist window, filepath, splitter
> size type settings without having to set each one specifically.  I
> know that Cocoa has this feature, wondering if Qt has it too, though I
> imagine the answer is no.

If you're using QMainWindow see QMainWindow::saveState() and 
QMainWindow::restoreState().

Also QWidget::saveGeometry(), and QWidget::restoreGeometry().

For application specific stuff like file path and font size you will need to 
save and restore things individually, but QSettings is pretty easy to use.

Ross. 




More information about the Qt-interest-old mailing list