View difference between Paste ID: vApWRqve and wbM5115Z
SHOW: | | - or go back to the newest paste.
1
import QtQuick 2.9
2
import QtQuick.Window 2.2
3
import QtQuick.Layouts 1.3
4
5
Window {
6
    visible: true
7
    width: 500
8
    height: 400
9
10
    RowLayout {
11
        id: rowLayout
12
        width: parent.width
13
        spacing: 8
14
        Text {
15
            text: "Please don't elide me"
16
            Layout.fillWidth: true
17
            Layout.minimumWidth: implicitWidth
18
            Rectangle {
19
                anchors.fill: parent
20
                border.width: 1
21
                z: -1
22
            }
23
        }
24
        Text {
25
            text: "You can elide me because we don't really care about my long text, but having it longer is still nice if it can fit."
26
            elide: Text.ElideRight
27
            Layout.minimumWidth: 0
28
            Rectangle {
29
                anchors.fill: parent
30
                border.width: 1
31
                z: -1
32
            }
33
        }
34
        Rectangle {
35
            // some control that should be visible
36
            width: 30
37
            height: 30
38
            color: "black"
39
        }
40
    }
41
    Rectangle {
42
        x: 5
43
        width: rowLayout.width - 10
44
        color: "red"
45
        height: 1
46
    }
47
}