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

Problems with positioning of Popup with default margins

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.0 FF
    • 5.13.0, 5.15
    • Quick: Controls 2
    • None
    • Dell XPS 15 9560, Windows 10
    • Windows
    • 62014e9ce (dev)

    Description

      Example code:

      import QtQuick 2.13
      import QtQuick.Controls 2.13
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Rectangle {
              x: 100
              y: 100
              width: popup.width
              height: popup.height
              color: "orange"
      
              DragHandler {}
      
              Popup {
                  id: popup
      
                  //anchors.centerIn: parent //If this line is active and you drag popup to bottom or right of the window, application will be hang.
                  visible: true
                  closePolicy: Popup.NoAutoClose
                  contentItem: Label {
                      text: "Drag me!"
                  }
                  background: Rectangle {
                      border.color: "black"
                      border.width: 1
                      color: "grey"
                  }
              }
          }
      }
      

      There are two errors:

      • Drag Popup to left or border top of the window: Popup doesn't care about margins -1 and will be rendered incorrectly at the window border (contentItem beside of background)
      • Activate anchors.centerIn: parent for Popup and drag Popup to bottom or right border of the window: The application freezes.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-77647
          # Subject Branch Project Status CR V

          Activity

            People

              santhoshkumar Santhosh Kumar Selvaraj
              permotion88 Karol Polak
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes