Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.9
- import QtQuick.Window 2.2
- import QtQuick.Layouts 1.3
- Window {
- visible: true
- width: 500
- height: 400
- RowLayout {
- id: rowLayout
- width: parent.width
- spacing: 8
- Text {
- text: "Please don't elide me"
- Layout.fillWidth: true
- Layout.minimumWidth: implicitWidth
- Rectangle {
- anchors.fill: parent
- border.width: 1
- z: -1
- }
- }
- Text {
- 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."
- elide: Text.ElideRight
- Layout.minimumWidth: 0
- Rectangle {
- anchors.fill: parent
- border.width: 1
- z: -1
- }
- }
- Rectangle {
- // some control that should be visible
- width: 30
- height: 30
- color: "black"
- }
- }
- Rectangle {
- x: 5
- width: rowLayout.width - 10
- color: "red"
- height: 1
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement