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

StackView doesn't fit its content

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.11.2
    • Quick: Controls 2
    • None
    • * Qt 5.11.2 (MSVC 2015 32 bit)
      * Windows 10
    • 8349cf8335ca16c7ecc85e877d9f4ec24bad49cd

    Description

      Following code:

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.4
      import QtQuick.Layouts 1.3
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          MouseArea {
              anchors.fill: parent
              onDoubleClicked: dialog.open()
          }
      
          Dialog {
              id: dialog
              title: "I'm dialog"
              contentItem: StackView {
                  initialItem: Rectangle {
                      width: 200; height: 200
                      color: "red"
                  }
              }
          }
      }
      

      does not work as expected.

      I assume that StackView will resize own width and height according to the size of a current content item (i.e to 200x200 pixels)... But this does not happens (please see screenshoot).

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              kuzulis Denis Shienkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes