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

Layout.minimumWidth allows the width to briefly be set to a value less than the minimum width when adjusting a SplitView

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None
    • Qt 5.9.3, Windows 10 version 1607, 64-bit

    Description

      With the following code:

      import QtQuick 2.9
      import QtQuick.Controls 1.4
      import QtQuick.Layouts 1.3
      
      Rectangle {
          id: root
          width: 400
          height: 200
      
          SplitView {
              anchors.fill: parent
              Item {
                  id: leftItem
                  height: parent.height
                  width: 200
                  Layout.minimumWidth: 100
                  onWidthChanged: console.log("leftItem.width:  ", width)
              }
      
              Item {
                  id: rightItem
                  height: parent.height
                  width: 200
                  Layout.fillWidth: true
                  onWidthChanged: console.log("rightItem.width: ", width)
              }
          }
      }
      

      When adjusting the slider to less than 100 produces output like:

      qml: leftItem.width:   101
      
      qml: rightItem.width:  298
      
      qml: leftItem.width:   100
      qml: rightItem.width:  299
      
      qml: leftItem.width:   99
      qml: leftItem.width:   100
      
      qml: leftItem.width:   98
      qml: leftItem.width:   100
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nocnokneo Taylor Braun-Jones
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes