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

qml qt quick ui is ruined after displaying a dialog with footer or contentItem populated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.12.11, 5.15.2
    • Quick: 2D Renderer
    • None
    • Windows

    Description

      I'm an open source developer, unfortunately I can't test this issue on 5.15.6.

      When displaying a dialog that populates the footer or contentItem properties results in a ruined ui. Artefacts are displayed, text is unreadable.

      ui before displaying the dialog:

      While displaying the dialog:

      after displaying the dialog:

      Clearing the contentItem and footer properties 'resolve' the issue.

      I was only able to reproduce this issue on Windows. On linux it works like a charm.

      Sample qml:

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.15
      
      
      Window {
          id: wd
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          ColumnLayout {
              Text {
                  id: x
                  text: "Custom text"
                  font.pixelSize: 30
              }
      
              Button {
                  id: y
                  text: "Click here!"
                  font.pixelSize: 30
      
                  MouseArea {
                      onClicked: function() {
                          dialog.text = "hello world";
                          dialog.open()
                      }
                      anchors.fill: parent
                  }
              }
          }
      
          Dialog {
              property string text: ""
      
              id: dialog
              modal:true
              focus: true
              closePolicy: Popup.CloseOnEscape
              x: Math.round((parent.width - width) / 2)
              y: Math.round((parent.height - height) / 2)
      
              header: Text {
                  text: parent.title
              }
      
              footer: DialogButtonBox {
                 Button {
                      text: "Close"
                      DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
                      onClicked: dialog.accept
                  }
              }
              contentItem: Text {
                  text: dialog.text
              }
          }
      } 

      Attachments

        1. image-2021-09-12-13-12-27-096.png
          18 kB
          Laurens Coudeville
        2. image-2021-09-12-13-12-38-936.png
          20 kB
          Laurens Coudeville
        3. image-2021-09-12-13-12-48-743.png
          20 kB
          Laurens Coudeville
        4. image-2021-09-12-13-12-57-943.png
          20 kB
          Laurens Coudeville
        5. image-2021-09-12-13-13-07-523.png
          18 kB
          Laurens Coudeville
        6. qt_quick_dialog_bug.tar.gz
          5 kB
          Laurens Coudeville
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            janichol Andy Nichols
            lcoudeville Laurens Coudeville
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes