Page

To access the property from outside:

document.childByName("Page 1").PROPERTY_NAME

To access the property from the page:

page.PROPERTY_NAME

For example, to change page background color on click the button:

import QtQuick 2.5

Item {
    Connections {
        target: document.childByName("Form 1").scriptAdaptor
        onEventItemClicked: {
            document.childByName("Page 1").style.blockBackgroundColor = "#ff0000"
        }
    }
}
Property Function Type
Have maximized item Gets true if there is maximized widget on page

Actions editor:
Property > Page > Geometry > Have maximized item
Code:
page.haveExpandedItem
bool

Style

Background

Property Function Type
Background color Sets page background color

Actions editor:
Property > Page > Style > Background > Background color
Code:
page.style.pageBackgroundColor
color
Background image Sets page background image

Actions editor:
Property > Page > Style > Background > Background image
Code:
page.style.pageBackgroundMedia
string
Background fill mode Sets page background fill mode

Actions editor:
Property > Page > Style > Background > Background fill mode
Code:
page.style.pageBackgroundFillMode
enum

Values:
Stretch
PreserveAspectFit
PreserveAspectCrop
Tile
TileVertically
TileHorizontally
Pad

Overlay

Property Function Type
Overlay image Sets page overlay image

Actions editor:
Property > Page > Style > Overlay > Overlay image
Code:
page.style.pageOverlayMedia
string
Overlay fill mode Sets page overlay fill mode

Actions editor:
Property > Page > Style > Overlay > Overlay fill mode
Code:
page.style.pageOverlayFillMode
enum

Values:
Stretch
PreserveAspectFit
PreserveAspectCrop
Tile
TileVertically
TileHorizontally
Pad

Actions

Property Function
Enter Manually fire Enter event

Actions editor:
Actions > Enter
Code:
page.script.actionEntered()
Press Manually fire Press event

Actions editor:
Actions > Press
Code:
page.script.actionItemPressed()
Click Manually fire Click event

Actions editor:
Actions > Click
Code:
page.script.actionItemClicked()
Double click Manually fire Double click event

Actions editor:
Actions > Double click
Code:
page.script.actionItemDoublePressed()
Execute Execute custom script

Actions editor:
Actions > Execute
Code:
page.script.actionExecute(QString code)
Minimize all Minimize all maximized items

Actions editor:
Actions > Minimize all
Code:
page.script.actionShrinkAll()
Save as image Save current page as image to default Images folder

Actions editor:
Actions > Save as image
Code:
page.script.actionSaveAsImage()

Events

Property Function
Enter Event when the page was opened

Actions editor:
Event > Enter
Code:
page.script.eventEntered()
Leave Event when leave the page

Actions editor:
Event > Leave
Code:
page.script.eventLeaved()
Before enter Event before open page

Actions editor:
Event > Before enter
Code:
page.script.eventBeforeEnter()
Press Event when mouse is pressed on the page or widget on the page

Actions editor:
Event > Press
Code:
page.script.eventItemPressed()
Click Event when mouse is released

Actions editor:
Event > Click
Code:
page.script.eventItemClicked()
Double click Event when double clicked on the page

Actions editor:
Event > Double click
Code:
page.script.eventItemDoublePressed()
Maximized item Event when page item is maximized

Actions editor:
Event > Maximized item
Code:
page.script.eventExpandItem()
Minimized item Event when page item is minimized

Actions editor:
Event > Minimized item
Code:
page.script.eventShrinkItem()

results matching ""

    No results matching ""