[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Restoring default window configuration
From: |
Daniel J Sebald |
Subject: |
Re: Restoring default window configuration |
Date: |
Tue, 30 Apr 2013 02:06:27 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 04/29/2013 04:41 PM, John W. Eaton wrote:
What is the proper way to restore the "factory default" window
configuration in the GUI without resetting all the current Qt settings?
My attempt is here:
http://hg.savannah.gnu.org/hgweb/octave/rev/e13051d7a472
Does this look like a reasonable solution, or is there some better way
to do it?
Looks reasonable but the cast that already existed in there is so-so.
Seems like something that should be a level down, plus it's a
QMainWindow and should have a list of QDockWidgets somewhere that is
easily accessible, at least one would think that.
+ if (floating)
+ widget->setWindowFlags (Qt::Window);
There is this "setFloating" routine:
http://qt-project.org/doc/qt-4.8/qdockwidget.html#floating-prop
that might be the preferred route (since it exists...what else could it
be for?).
This documentation makes it look too simple:
http://qt-project.org/doc/qt-4.8/qmainwindow.html#restoreState
Instead of individual QDockWidget restoreGeometry member functions, it
uses the QMainWindow restoreGeometry member function.
Dan