[Qt-interest] Persist Application Wide Settings

Willy P willy.lists at gmail.com
Wed Oct 21 09:03:24 CEST 2009


Ross,
Thanks so much, that's exactly what I needed.

-Willy

On Mon, Oct 19, 2009 at 7:08 PM, Ross Bencina
<rossb-lists at audiomulch.com> wrote:
> 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