[Qt-interest] How to restore position of one dock?
David Boosalis
david.boosalis at gmail.com
Sat Feb 27 17:31:13 CET 2010
Here is how I do it for saving and writting settings. The dock widget below
is called consoleDock.
// readSettings on application start
QSettings settings;
QAction action = consoleDock->toggleViewAction();
if (action) {
showMe = settings.value("ConsoleArea",true).toBool();
action->setChecked(showMe);
if (!showMe)
consoleDock->hide();
}
//write settings on application close
QSettings settings;
action = consoleDock->toggleViewAction();
settings.setValue("ConsoleArea",action->isChecked());
Like wise you can read/set setting values for where the DockWidget is
placed.
-David
On Fri, Feb 26, 2010 at 8:13 AM, Konstantin Tokarev <annulen at yandex.ru>wrote:
> Is there any way to restore state of one dock without touching restoreState
> of MainWindow?
> --
> Regards,
> Konstantin
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100227/2a339399/attachment.html
More information about the Qt-interest-old
mailing list