PDA

View Full Version : QDockWidget wierdness



mhoover
26th February 2010, 19:35
When I call:


my_dockwidget->setFloating( true );

Nothing happens. I can't see the widget in my QMainWindow or floating.

But if I do this:


my_dockwidget->setFloating( false );
my_dockwidget->setFloating( true );
Then it pops up.

Is this a bug in Qt?

In the case where it doesn't pop up, I cout'ed the isVisible() isFloat() parameters and both were true!

Lykurg
26th February 2010, 20:29
How do you dock your widget? Because on default floating is true. So I guess when you dock your widget that property isn't changed.

mhoover
26th February 2010, 21:24
If the property is set to "true" I would think it should be floating and visible.

I dock it by typing:
addDockWidget( (Qt::DockWidgetArea)the_widget->dock_area, the_widget->the_dock);

Where the_widget is a wrapper around a QDockWidget *the_dock.