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

Flickable and PinchArea are not working well together



    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.4.0, 5.4.1
    • Fix Version/s: None
    • Labels:
    • Environment:
      Android, iOS, Linux



      I want to report a bug with Flickable and PinchArea and would like seek for alternative solution. The problem can be demonstrated with following code:

      import QtQuick 2.3
      import QtQuick.Window 2.2
      Window {
          id : window
          visible: true
          Flickable {
              id : flickable
              anchors.fill: parent
              interactive: true
              contentWidth: container.width
              contentHeight: container.height
              flickableDirection: Flickable.HorizontalAndVerticalFlick
              PinchArea {
                  pinch.target : container
                  pinch.maximumScale: 8
                  pinch.minimumScale: 0.5
                  anchors.fill: parent
                  onPinchStarted: {
                      console.log("pinch started");
                      flickable.interactive = false
                  onPinchFinished: {
                      flickable.interactive = true;
              Item {
                  id: container
                  width: window.width
                  height: window.height
                  Rectangle {
                      anchors.centerIn: parent
                      width: window.width * 0.5
                      height: window.height * 0.5
                      color : "red"

      It shows a red rectangle in the center of screen. You may drag it by single finger and pinch it by two fingers to resize. It is working well with Qt 5.3.2 on Android 4 and iOS 8 .

      However, if it is compiled with Qt 5.4.0 / 5.4.1 , it will be very difficult to get the pinching works. Your fingers must be touch on the screen at the SAME time. Otherwise, the pinch started signal will not be triggered.

      The example project has been attached.


      p.s Will it have alternative solution in using Flickable + PinchArea?


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



            • Assignee:
              srutledg Shawn Rutledge
              benlau Ben Lau
            • Votes:
              8 Vote for this issue
              13 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes