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

Dialog ignores content implicitWidth

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.4.2, 5.5.1, 5.6.0 Alpha
    • Quick: Dialogs
    • None
    • Mageia Linux Cauldron x86_64, gcc 5.2.1
    • 10f0ae7c571b7e0de41d5fdc5627db6a1ddeb926

    Description

      In documentation I read, that dialogs tries to resize itself to the content. I found, that it only changes own height, but not width.

      import QtQuick 2.4
      import QtQuick.Controls 1.3
      import QtQuick.Dialogs 1.2
      
      ApplicationWindow {
          visible: true
          width: 400
          height: 300
      
          Dialog {
              id: testDialog
      
              Rectangle {
                  implicitWidth: 800
                  implicitHeight: 400
                  color: "lightblue"
                  border {
                      color: "red"
                      width: 1
                  }
              }
          }
      
          Button {
              anchors.centerIn: parent
              text: "Show dialog"
              onClicked: testDialog.open()
          }
      }
      

      Attachments

        1. dialog-first-show.png
          dialog-first-show.png
          8 kB
        2. dialog.png
          dialog.png
          7 kB
        3. dialog.patch
          2 kB
        4. dialog_resize.png
          dialog_resize.png
          10 kB
        5. dialog_reset_button.png
          dialog_reset_button.png
          8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            krnekit Nikita Krupenko
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: