2

I'm writing an application consisting of several pages. One page is a bit special, because it should fill up the whole screen. However, I cannot get rid of the page header, despite the fact that this item is not a page:

import QtQuick 2.0
import Ubuntu.Components 1.0

MainView {
    id: mainView

    width: units.gu(100)
    height: units.gu(75)
    useDeprecatedToolbar: false

    PageStack {
        id: pageStack
        Component.onCompleted: pageStack.push(first)

        Page {
            id: first
            title: i18n.tr("First page")
            visible: false

            Button {
                text: "Open second page"
                onClicked: pageStack.push(fullscreenComponent)
            }
        }
    }

    Component {
        id: fullscreenComponent
        Rectangle {
            anchors.fill: parent
            color: "green"
        }
    }
}

When the button on the first page is pressed, the screen turns green -- as expected -- but I can still see the page header. How can I avoid it?

1 Answer 1

1

You might also need to call

view.showFullScreen();

Not sure what other languages you are using, but usually this needs to be called.

You can also switch the other view to "Windowed" while the window that is suppose to be full screen should have

visibility: "FullScreen"
1
  • 1
    Thanks, that's also helpful, but my question is actually about how to hide the page header, that is how to make so that an item can fill up the whole window area (regardless whether the window itself is fullscreen or not). The title of my question was a bit misleading, I'll try to reformulate it now.
    – mardy
    Jan 28, 2015 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .