Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48072

ApplicationWindow doesn't respect its maximumWidth/Height

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 Alpha
    • 5.6
    • Quick: Controls 2
    • None
    • 3ae1022f42982348c341c2f296e7e7d6d3667fe0

    Description

      import QtQuick 2.5
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.1
      
      ApplicationWindow {
          visible: true
          width: 500
          height: 500
          maximumWidth: 500
          maximumHeight: 500
      
          RowLayout {
              width: parent.width
              height: 100
              anchors.verticalCenter: parent.verticalCenter
      
              Text {
                  id: a
                  text: "Normal text"
                  fontSizeMode: Text.Fit
                  font.pixelSize: 100
                  verticalAlignment: Text.AlignBottom
                  Layout.preferredWidth: parent.width / 2
                  Layout.fillHeight: true
      
                  Rectangle {
                      anchors.fill: parent
                      color: "transparent"
                      border.color: "black"
                  }
              }
      
              Text {
                  id: b
                  text: "More text"
                  verticalAlignment: Text.AlignBottom
                  minimumPixelSize: 51
                  font.pixelSize: a.font.pixelSize
                  Layout.fillWidth: true
                  Layout.fillHeight: true
      
                  Rectangle {
                      anchors.fill: parent
                      color: "transparent"
                      border.color: "black"
                  }
              }
      
              Text {
                  id: c
                  text: "Even more text"
                  verticalAlignment: Text.AlignBottom
                  minimumPixelSize: 51
                  fontSizeMode: Text.Fit
                  font.pixelSize: a.font.pixelSize
                  Layout.fillWidth: true
                  Layout.fillHeight: true
      
                  Rectangle {
                      anchors.fill: parent
                      color: "transparent"
                      border.color: "black"
                  }
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes