fluid icon indicating copy to clipboard operation
fluid copied to clipboard

Page component doesn't work

Open luntik2012 opened this issue 8 years ago • 4 comments

I have just this in my application window root. I see empty white rectanlge with Material.elevation without appBar.

    Page {
        id: page

        height: 300
        width: 200

        anchors.centerIn: parent

        title: qsTr("Move to another car")
    }

If I do this, I'll see red empty rectangle and "qml: 48 48 0 0" in console:

Page {
        id: page

        height: 300
        width: 200

        anchors.centerIn: parent

        title: qsTr("Move to another car")

        Rectangle {
            anchors.fill: parent
            color: "red"
        }

        Component.onCompleted: console.log(appBar.height, " ",
                                           appBar.implicitHeight, " ",
                                           appBar.width, " ",
                                           appBar.implicitWidth)
    }

luntik2012 avatar Apr 25 '18 14:04 luntik2012

This is a fix, please edit example in Page.qml

header: appBar

luntik2012 avatar Apr 25 '18 14:04 luntik2012

No the app bar is inside the ApplicationWindow's header and the page toolbar is stacked into it.

plfiorini avatar May 10 '18 14:05 plfiorini

I don't know what you are trying to achieve, could you elaborate please?

plfiorini avatar May 10 '18 14:05 plfiorini

I don't understand why is it necessary to set Page.header to appBar to view Page header

luntik2012 avatar May 23 '18 12:05 luntik2012