API Documentation

Documentation for developing SailfishOS applications

PageHeader QML Type

A header for use in a Page More...

Import Statement: import Sailfish.Silica 1.0

Properties

Detailed Description

The PageHeader type provides a styled header for use in a Page. The PageHeader should be placed at the top of the Page:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 Page {
     Column {
         spacing: 10
         anchors.fill: parent
         PageHeader {
             title: "Details"
         }
         Label {
             text: "Name: " + name
         }
         Label {
             text: "Age: " + age
         }
     }
 }

In pages which display a flickable view it is preferable to place the PageHeader in the header of the view so that it does not obscure the view when it is scrolled, for example:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 Page {
     ListView {
         id: listView
         anchors.fill: parent
         header: PageHeader {
             width: listView.width
             title: "Songs"
         }
         delegate: Column {
             Label {
                 text: "Name: " + name
             }
             Label {
                 text: "Artist: " + artist
             }
         }
     }
 }

See also Page and DialogHeader.

Property Documentation

description : string

Optional text to add a secondary description to the page.


extraContent : Item

This property provides the item controlling the interior space of the page header. This item can be used to insert extra context into the header.


leftMargin : real

The margins between the left and right edges of the header and its contents. The default value is Theme.horizontalPageMargin.


rightMargin : real

The margins between the left and right edges of the header and its contents. The default value is Theme.horizontalPageMargin.


title : string

This property holds the text to display in the header.


We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.