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

After a flick ListViews are not coming to rest on an exact pixel

    XMLWordPrintable

Details

    • f67ba78760602642bd947abed261e84dadb9cfdf

    Description

      When items are drawn across pixel boundaries they go blurry. When a ListView comes to rest is should stop on an exact pixel (integer). Currently they are able to come to a stop on float and some parts can become blurry. (At least on the Mac?)

      import QtQuick 2.0
      
      Rectangle {
          width: 800
          height: 400
      
          Rectangle {
              id: rect
              x: 500
              y: 80
              width: 20
              height: 20
              color: "pink"
          }
      
          ListView {
              width: 400
              height: 400
              model: 100
              delegate: Rectangle {
                  id: innerRect
                  width: 400
                  height: 50
                  color: index % 2 ? "grey" : "darkgrey"
                  Rectangle {
                      width: 400
                      height: 1
                      color: "black"
                      y: 25
                  }
      
                  MouseArea {
                      id: mouse
                      anchors.fill: parent
                      onClicked: print(innerRect.mapToItem(rect).y)
                  }
              }
          }
      
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            designker Nigel Hietala
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes