Example on Page QML documentation does not work, Cannot assign to non-existent property "head"

Bug #1480697 reported by Stuart Langridge
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
New
Undecided
Unassigned

Bug Description

https://developer.ubuntu.com/api/apps/qml/sdk-14.10/Ubuntu.Components.Page/ gives, as its example for how to use a Page, this QML:

import QtQuick 2.0
import Ubuntu.Components 1.1
MainView {
    width: units.gu(48)
    height: units.gu(60)
    Page {
        title: i18n.tr("Example page")
        Label {
            anchors.centerIn: parent
            text: i18n.tr("Hello world!")
        }
        head.actions: [
            Action {
                iconName: "search"
                text: i18n.tr("Search")
            },
            Action {
                iconName: "contacts"
                text: i18n.tr("Contacts")
            }
        ]
    }
}

Putting that in a file and running it gives an error:

$ qmlscene ~/Scratch/headactions.qml
file:///home/aquarius/Scratch/headactions.qml:12 Cannot assign to non-existent property "head"

This means that I do not understand how to use header actions in a Page at all.

affects: developer-ubuntu-com → ubuntu-ui-toolkit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.