Currently PagePool allows pages to be pushed onto the stack but there
is no way to pass initialization properties to the newly-created
page. This change adds support for this, and also provides
asynchronous object creation to speed things up a bit.
Details
Details
- Reviewers
mart - Group Reviewers
Kirigami - Commits
- R169:bb5a6c13ec0b: Add property initializer support to PagePool
After running the following main.qml the page stack will first
push a page with the default title "NO PROPERTIES" because it
invokes the no-property behavior. Afterward the same page gets
pushed on the stack but this time it sets the title to
"PROPERTIES" using the passed-in properties object.
// main.qml
Kirigami.ApplicationWindow {
id: window Kirigami.PagePool { id: pool } Kirigami.PagePoolAction { id: noprops text: "Action with props" pagePool: pool pageStack: window.pageStack page: "qrc:/TestPage.qml?hasProps=" + false } Kirigami.PagePoolAction { id: props text: "Action with props" pagePool: pool pageStack: window.pageStack page: "qrc:/TestPage.qml?hasProps=" + true properties: { title: "PROPERTIES" } } Component.onCompleted: { noprops.trigger() props.trigger() }
}
// TestPage.qml
Kirigami.Page {
title: "NO PROPERTIES"
}
Diff Detail
Diff Detail
- Repository
- R169 Kirigami
- Branch
- add-pagepool-properties (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 24579 Build 24597: arc lint + arc unit