PDA

View Full Version : Always undocked dock Widget



dram
21st September 2014, 01:17
Hello.

In qt designer i added dock widget.

But in features i saw and select these options

DockWidgetArea - "No dock widget area"
AllowedAreas - no Dock widget area
floating (selected - true)
dockwindowmoveable - true
dockwindowfloatable - true

And there is one more option called 'docked'

But this option is gray (i cant do nothing with this feature)

When i set 'floating' option and start program my dock widget is undocked but when i press 2 LPM my dock widget is going to dock.

So the question is:

How to UNDOCK dock widget for all the time ? (dock widget cant be closeable)

anda_skoa
21st September 2014, 11:28
If you want a window that is never docked, why use a QDockWidget?
Wouldn't a normal child window be more appropriate if you don't need any of the dock widget features?

Cheers,
_

dram
24th September 2014, 22:09
Okey but, when i make own window i saw second title in system bar (bottom bar)

(one with main program + second with window) - i dont want it

Infinity
25th September 2014, 02:28
Set the main window as the parent of the second window. Then second window shouldn't appear in the task bar.

anda_skoa
25th September 2014, 11:50
Set the main window as the parent of the second window. Then second window shouldn't appear in the task bar.

Right.
I would suggest using QDialog as the window base class, it has all window flags set appropriately.

Cheers,
_