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

Popup margins are ignored or broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.6.0
    • Quick: Controls 2
    • None
    • 47e50cb3d0088e1080c98996601664119d3d588e

    Description

      When I try to use margins in popup, it does not work as expected. Left, right and bottom margins just do nothing. Top margin move popup to the bottom side of the window and setting margins property does the same, but broke popup size.

      Test program:

      import QtQuick 2.6
      import QtQuick.Layouts 1.0
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
          width: 400
          height: 300
      
          Pane {
              anchors.fill: parent
      
              Popup {
                  id: popup
      
                  contentWidth: rect.width
                  contentHeight: rect.height
      //            leftMargin: 50
      //            rightMargin: 50
      //            bottomMargin: 50
                  topMargin: 50
      //            margins: 50
      
                  Rectangle {
                      id: rect
      
                      width: 100
                      height: 100
                      color: "green"
                  }
              }
          }
      
          Component.onCompleted: popup.open()
      }
      

      Attachments

        1. margins.png
          margins.png
          6 kB
        2. topMargin.png
          topMargin.png
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes