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

PointHandler deactivated on touch screen

    XMLWordPrintable

Details

    • Windows
    • 0b7ee7a48f (qt/qtdeclarative/dev) 0b7ee7a48f (qt/tqtc-qtdeclarative/dev) 0ca06764dc (qt/qtdeclarative/6.4) 0ca06764dc (qt/tqtc-qtdeclarative/6.4)

    Description

      Example code from PointHandler documentation:

       

       import QtQuick 2.12
       import QtQuick.Window 2.2 
       Window {
           width: 480
           height: 320
           visible: true     
            Item {
               id: glassPane
               z: 10000
               anchors.fill: parent         
               PointHandler {
                   id: handler
                   acceptedDevices: PointerDevice.TouchScreen | PointerDevice.TouchPad
                   target: Rectangle {
                       parent: glassPane
                       color: "red"
                       visible: handler.active
                       x: handler.point.position.x - width / 2
                       y: handler.point.position.y - height / 2
                       width: 20; height: width; radius: width / 2
                   }
               }
           }
       }
      

      does't work correctly for touch screen. Movement of the finger after pressingg causes Handler's deactivatation and the red circle disappears. If the line with acceptedDevices is commented out and if you use a mouse and not a touch screen, everything works without a problem

       

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              permotion88 Karol Polak
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes