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

1 pixel residual border when drag rectangleitem in QML scene

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2
    • Quick: Widget
    • None
    • linux wayland arm64,ubuntu 2004

    Description

      On arm64 Linux/wayland platform, there will be 1 pixel residual border when drag rectangle
      item in QML scene when os desktop environment scale is fraction, such as 1.25, 1.50, 1.75, attachment 111.png is the phenomenon, example code are as follows:

      //代码占位符
      import QtQuick 2.4Rectangle {
          id: box
          width: 320; height: 480
          Rectangle {
              id: blueSquare
              width: 120; height: 120
              x: box.width - width - 10; y: 10    // making this item draggable, so don't use anchors
              color: "blue"
              radius: 8;
              smooth: true;
              clip: true;
              border {
                  color: root.focus ? "#3498DB" : "#AED6F1";
                  width: 1;            Behavior on color {
                      PropertyAnimation {
                          duration: 150;
                      }
                  }
              }
              Text { text: "Drag"; font.pixelSize: 16; color: "white"; anchors.centerIn: parent }
              MouseArea {
                  anchors.fill: parent
                  //! [drag]
                  drag.target: blueSquare
                  drag.axis: Drag.XAndYAxis
                  drag.minimumX: 0
                  drag.maximumX: box.width - parent.width
                  drag.minimumY: 0
                  drag.maximumY: box.height - parent.width
                  //! [drag]
              }
          }
      }
      

      Attachments

        1. 111.png
          111.png
          3 kB
        2. panelitemviewitem.png
          panelitemviewitem.png
          31 kB
        3. rubberband.png
          rubberband.png
          330 kB
        4. rubberband-1.png
          rubberband-1.png
          10 kB

        Activity

          People

            tvete Paul Olav Tvete
            lizhenneng lizhenneng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: