PageContext QML Type
A page-level context object for navigation. More...
| Import Statement: | import FluentUI.Controls 1.0 |
Properties
Methods
Detailed Description
PageContext provides navigation capabilities to individual pages within a PageRouter-based navigation system. It is typically available as a context property within routed pages, allowing them to navigate to other pages, return to the previous page, or access the current route URL and arguments.
Usage Example
import QtQuick import FluentUI.Controls Rectangle { PageContext { id: pageCtx url: "home" argument: { userId: 42 } } Button { onClicked: pageCtx.go("settings") } }
Property Documentation
argument : var
The argument passed to the current page during navigation. This can be any valid QML value.
url : string
The URL of the current page route.
Method Documentation
void go(url url, var argument)
Navigates to the specified route url with an optional argument.
void pop()
Pops the current page from the navigation stack and returns to the previous page.
void push(url url, var argument)
Pushes a new page onto the navigation stack with the specified url and optional argument.