Page

A single page within an application More...

Import Statement: import VPlayApps 1.0
Inherits:

MouseArea

Inherited By:

ListPage

Properties

Signals

Detailed Description

The Page type provides a container for the contents of a single page within an application. This type is designed to be used together with components like Navigation or NavigationStack to provide a native-looking UI and user experience.

Note: Due to V-Play internal mechanisms that provide the native look-and-feel, the Page type places it's content inside of an additional container item. The Page type is thus not a direct parent of the items you add to the Page. This is for example relevant when anchoring content items to the Page. As anchoring is only allowed between siblings or to the direct parent, it is not possible to anchor an item directly to the Page. Please anchor your content items to their parent instead, which is the internal container item.

Property Documentation

[read-only] Item : NavigationStack

The nearest parent item in the QML hierarchy that is a NavigationStack item. (read-only)

If the current item or one of its parent items is a child of a NavigationStack item, this property contains the owning NavigationStack item. This property is null if the Page is not embedded inside a NavigationStack item.


backNavigationEnabled : bool

Set this property to false to disable the back navigation within a page in a NavigationStack if previous pages exist on the stack.

Disabling the back navigation hides the "back" button within a NavigationBar, deactivates the iOS back swipe gesture and also disables the hardware back button on Android and Windows Phone.

The default value is true.

Note: Setting this property only has an effect if the Page is used inside a NavigationStack.


backgroundColor : color

The background color of the Page which is displayed if no other items are placed within the page.

The default value is defined in the Theme::backgroundColor property and can be overridden.


[read-only] canNavigateBack : bool

Readonly property holds whether it is possible to actually navigate back within the current stack. The property is true if a previous page exists on the stack, otherwise false.

This QML property was introduced in V-Play 2.7.0.


[read-only] isCurrentStackPage : bool

Whether the page is currently the NavigationStack::currentPage on top of the stack.

This QML property was introduced in V-Play 2.9.2.


leftBarItem : Item

A custom navigation bar item displayed on the left of the navigation bar if the item is on top of a NavigationStack as a direct child of it.

By default this item displays a back navigation item if the current NavigationStack can navigate back. If setting the item to an explicit NavigationBarItem it replaces the back button with the custom item.


A boolean value indicating whether the navigation bar should be hidden for that specific Page if the item is presented within a NavigationStack item.

You can set this property to false to implement a custom styled full-screen page within a NavigationStack without the default navigation bar behavior (make sure to implement a custom back navigation action in that case).

By default this property is false, meaning that the navigation bar is visible for that Page.


Set this value to make the navigation bar translucent for that specific Page within a NavigationStack.

The allowed value range is 0.0 to 1.0. The default value is 0.0, meaning that the navigation bar is not translucent (fully opaque).

If using a translucent navigation bar, the page content will move beneath the navigation bar and you should add that extra spacing for your pages on your own (you can get the current height from ThemeNavigationBar::height).

This QML property was introduced in V-Play 2.7.0.


The nearest parent item in the QML hierarchy that is a NavigationStack item. (read-only)

If the current item or one of its parent items is a child of a NavigationStack item, this property contains the owning NavigationStack item. This property is null if the Page is not embedded inside a NavigationStack item.


rightBarItem : Item

A custom navigation bar item displayed on the right of the navigation bar if the item is on top of a NavigationStack as a direct child of it.

By default this item is empty.


tabBarHidden : bool

A boolean value indicating whether a tab bar should be hidden for that specific Page if the item is presented within a Navigation item showing tabs.

By default this property is false, meaning that the tab bar is visible for that Page.

This QML property was introduced in V-Play 2.7.0.


title : string

A localized, human-readable string that represents the the content of this page.

The title is used as string in a navigation bar if the Page item is a child of a NavigationStack.


titleItem : Item

A custom navigation bar item displayed at the title slot of the navigation bar if the item is on top of a NavigationStack as a direct child of it.

By default, the title of the page is displayed.

This QML property was introduced in V-Play 2.6.2.


Signal Documentation

popped()

This signal is triggered whenever the Page is popped from its NavigationStack.

Note: Only the popped signal of the top-most page is triggered when you remove more than one page at once with methods like NavigationStack::popAllExceptFirst or NavigationStack::popAllExceptFirstAndPush.

This QML signal was introduced in V-Play 2.9.2.

See also pushed.


pushed()

This signal is triggered whenever the Page is pushed on a NavigationStack.

This QML signal was introduced in V-Play 2.9.2.

See also popped.


Videos

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support