i'm trying to put a floated (undocked) QDockWidget into full screen mode. On Windows everything seems straight forward. For example i connect the topLevelChanged() signal of a dockwidget (dw) to a custom slot floatingChanged()
connect(dw, SIGNAL(topLevelChanged(bool)), this, SLOT(floatingChanged(bool)));
inside the slot i check: if dw is floating and call dw->showFullscreen().
void MainWindow::floatingChanged(bool floating)
{
if( floating )
{
QDockWidget* dw = static_cast<QDockWidget*>(QObject::sender());
dw->showFullScreen();
}
}
in windows the undocked (floating) QDockWidget switches directly into full screen mode after undocking. But under linux (ubuntu 12.04, gnome-shell 3.4.1) this does not work (qt 4.8.0). The dock widget just stays in normal mode.
I can't figure out how to switch a (floating) QDockWidget into fullscreen mode. Any solutions on this are very welcome. In fact the different OS's are acting different on this purpose.
I already searched the web without success, so this is my first post here. Please forgive me for spelling errors i'am not native english speaker, thanx ;)
p.s. I gonna try osx-lions behaviour too. By the way: To try it out just implement the above shown floatingChanged() slot in the MainWindow of the Qt example http://qt-project.org/doc/qt-5.0/qtwidgets/mainwindows-mainwindow.html and connect it with any of the existing dockwidgets or inside the MainWindow::createDockWidget() method.