Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Resizing Issue
Qt 6.11 is out! See what's new in the release blog

Resizing Issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 256 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pekeso
    wrote on last edited by
    #1

    Hi,
    I have a window resizing issue.
    I have a label widget with a long text on top.
    Then I have a RowLayout widget with a label on the right and an input text field on the left.
    The behavior I want is for the input text field to remain visible when resizing the window by making it smaller. However, what I get is the input text field disappears when I make the window smaller.

    But when I make the top text smaller (by removing the second sentence), the input text field doesn't disappear when resizing the window.
    Can somebody help me, please? Here's my sample code.

    import QtQuick
    import QtQuick.Window
    import QtQuick.Controls
    import QtQuick.Layouts
    
    Window {
        id: window
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
        Layout.margins: 5
    
        ScrollView {
            id: scrollView
            anchors.fill: parent
    
            ColumnLayout {
                width: scrollView.availableWidth
                height: scrollView.availableHeight
    
                Label{
                    wrapMode: Text.WordWrap
                    width: window.width - 20
                    Layout.minimumWidth: 200
                    text: qsTr("Changes to the following settings are applied to the current document and to future documents. If you only wish to change the current document use the Invoice tab.")
                }
    
                RowLayout {
                    Label{
                        text: qsTr("Invoice title")
                        Layout.fillWidth: true
                    }
    
                    TextField {
                        implicitWidth: 200
                        text: qsTr("Document")
                    }
                }
            }
        }
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved