[Qt-interest] How to prevent automatic loading of QDockWidget?
Frederic Tingaud
tingaud at gostai.com
Fri Feb 26 10:29:27 CET 2010
Konstantin Tokarev a écrit :
> 25.02.10, 20:01, "J-P Nurmi" <jpnurmi at gmail.com>:
>
>
>> On Thu, Feb 25, 2010 at 7:57 PM, Konstantin Tokarev wrote:
>>
>>> My application has optional dockwidget, which is automatically shown when it's needed. How to prevent it's loading on application startup?
>>> --
>>> Regards,
>>> Konstantin
>>>
>> Just hide() the dock widget.
>> --
>>
>
> I've tried hide() and close(), latter works fine if I want to hide dock during runtime. But whatever I do, dock appears after application load if it was opened when application is closed
>
>
If they keep their position from last session, you probably have a
restoreState(QSettings) on your window.
If you try to hide them before the restore state and a state was saved,
visibility is switched back when restoring previous state.
--
Frederic Tingaud
More information about the Qt-interest-old
mailing list