qtubuntuqmlfullscreenubuntu-unity

Application viewer setfullscreen function not hiding ubuntu sidebar


I'm building the UI for an application using Qt and QML for Ubuntu Linux. I have a viewer window with a canvas element which is supposed to be fullscreen by default. On opening the application this works fine (i.e. Ubuntu sidebar and top taskbar are hidden). However, once I minimize my application and then maximize it again by using viewer->setFullScreen();, the Ubuntu sidebar and top taskbar are still visible and there is an offset while writing on the canvas due to the same. Any help would be appreciated.


Solution

  • According to this topic on askubuntu, your problem do really looks like Unity bug (or feature). But, according to somehow related bug on Launchpad, it seems that you can get desired behavior by:

    Turn "Always On Top" on via right-clicking the titlebar of your window, before making it go fullscreen. This will prevent the Unity panel from rendering on top of this fullscreen-window, when using the other screen.

    In Qt you can set Qt::WindowStaysOnTopHint to your window/widget via QWidget::windowFlags.

    Pay additional attention to notes in official documentation:

    Hope this helps.