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

Popup's contentItem isn't mirrored if no Window exists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.10
    • Quick: Controls 2
    • None

    Description

      If Popup can't find an Window, it doesn't apply RTL mirroring.

      This can be a problem with applications like widgets in Plasma having a ComboBox.

      import QtQuick 2.7
      import QtQuick.Layouts 1.3
      import QtQuick.Controls 2.3
      import QtQuick.Window 2.2
      
      Item { //with Window the RowLayout in myPopup order is reversed (mirroring is applied)
          LayoutMirroring.enabled: true
          LayoutMirroring.childrenInherit: true
      
          width: 350
          height: 150
      
          RowLayout {
              anchors.fill: parent
              Button {text: "1"}
              Button {
                  text: "2 clickable"
                  onClicked: {
                      myPopup.open()
                      console.log(myPopup.contentItem.LayoutMirroring.enabled)
                  }
              }
          }
      
          Popup {
              id: myPopup
              Component.onCompleted: {
                  console.log("completed")
                  console.log(contentItem.LayoutMirroring.enabled)
              }
              RowLayout {
                  anchors.fill: parent
                  Button {text: "1"}
                  Button {text: "2"}
              }
          }
      }
      

      Attachments

        Issue Links

          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
              safa alfulaij Safa Alfulaij
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes