aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlproperty/data/aliasToBinding.qml
blob: 54f9e3f944e79770fab159c0069cf7345c624444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import QtQuick 2.7

Item {
    id: _window
    property bool userFontStrikeout: true

    Component.onCompleted: {
            _box.font.strikeout = Qt.binding(function() { return _window.userFontStrikeout; });
    }

    Rectangle {
        id: _box
        width: 100
        height: 100
        property alias font: _text.font

        Text {
            id: _text
            anchors.fill: parent
            text: "Text"
        }
    }
}