Page QML Type | Fluid Reference Documentation

- Fluid Reference Documentation
- Fluid 1.2.0

# Page QML Type

Represents a page on the navigation page stack. More...

Import Statement: | import Fluid.Controls 1.1

- List of all members, including inherited members

## Properties

- actions : list<Fluid.Controls::Action>
- appBar : Fluid.Controls::AppBar
- canGoBack : bool
- customContent : list<Item>
- leftAction : Fluid.Controls::Action
- rightSidebar : Fluid.Controls::PageSidebar

## Signals

- void goBack(event)

## Methods

- void forcePop()
- void pop(event, bool force)
- void push(component, object properties)

## Detailed Description

Example:

      import QtQuick 2.10
      import Fluid.Controls 1.1 as FluidControls

      FluidControls.Page {
          title: "Application Name"

          actions: [
              FluidControls.Action {
                  name: "Print"

                  // Icon name from the Google Material Design icon pack
                  icon.source: FluidControls.Utils.iconUrl("action/print")
              }
          ]
      }

## Property Documentation

actions : list<Fluid.Controls::Action>

The page's actions shown in the action bar.

appBar : Fluid.Controls::AppBar

The action bar for this page. Use it as a group property to customize this page's action bar. See the Page example for details on how to use this property.

canGoBack : bool

Set by the page stack to true if there is a page behind this page on the page stack.

The default value is `false`.

customContent : list<Item>

Custom content to show instead of the title.

This property was introduced in Fluid.Controls 1.1.

leftAction : Fluid.Controls::Action

The action shown to the left of the title in the action bar. By default, this is a back button which shows when there is a page behind the current page in the page stack. However, you can replace it with your own action, for example, an icon to open a navigation drawer when on your root page.

rightSidebar : Fluid.Controls::PageSidebar

A sidebar to show on the right of the page. This will have its own app bar and title, which will split the toolbar into two app bars.

This property was introduced in Fluid.Controls 1.1.

## Signal Documentation

void goBack(event)

This signal is emitted when the back action is triggered or back key is released.

By default, the page will be popped from the page stack. To change the default behavior, for example to show a confirmation dialog, listen for this signal using `onGoBack` and set `event.accepted` to `true`. To dismiss the page from your dialog without triggering this signal and re-showing the dialog, call `page.forcePop()`.

See also Fluid.Controls::Page::forcePop().

## Method Documentation

void forcePop()

Force a pop from the page stack.

void pop(event, bool force)

Pop this page from the page stack. This does nothing if this page is not the current page on the page stack.

Use `force` to avoid calling the goBack signal. This is useful if you use the goBack signal to show a confirmation dialog, and want to close the page from your dialog without showing the dialog again. You can also use Fluid.Controls::Page::forcePop() as a shortcut to this behavior.

See also Fluid.Controls::Page::forcePop().

void push(component, object properties)

Push the specified component onto the page stack.

See also StackView::push().