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

Popup stretches outside window boundary when anchored with overlay centerIn

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.0 FF
    • 6.5
    • Quick: Other
    • None
    • All
    • 14ae60c31 (dev)

    Description

      The quick popup control stretches outside window bounds when anchored with overlay centerIn. Its in fact its allowed to move outside window bounds but not during overlay centerIn.

      Below is the qml sample that reproduces this issue:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      ApplicationWindow {
          id: appWindow
          height: 100
          visible: true
          width: 432
          ColumnLayout {
              Button {
                  text: "Long text"
                  onClicked: {
                      toast.text = "this is a long text causing a line break to show the binding loop (height) again after the first initialization of the text";
                      toast.open();
                  }
              }
              Button {
                  text: "Short text - wrong at first usage - binding loop (width)"
                  onClicked: {
                      toast.text = "short text";
                      toast.open();
                  }
              }
          }
          Popup {
              id: toast
              property alias text: toastText.text
              anchors.centerIn: Overlay.overlay
              dim: true
              modal: true
              contentItem: ColumnLayout {
                  Text {
                      id: toastText
                      Layout.fillWidth: true
                      wrapMode: Text.Wrap
                  }
              }
          }
      }
      
      

       

       

      Attachments

        Activity

          People

            santhoshkumar Santhosh Kumar Selvaraj
            santhoshkumar Santhosh Kumar Selvaraj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: