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

Nested pressDelays crashes application

    XMLWordPrintable

Details

    • 1bcddaaf318fc37c71c5191913f3487c49444ec6

    Description

      The code snippet below is a MouseArea inside a Flickable, which is the delegate for a ListView. With a pressDelay set in both the Flickable and ListView, pressing the MouseArea causes the application to crash. Remove one of the pressDelays and it all works fine.

      import Qt 4.7
      
      Rectangle {
          width: 480
          height: 800
      
          ListView {
              id: list
              model : 5
              property int prevIndex: 0
              width: 480
              height: 800
              anchors.centerIn: parent
              orientation: ListView.Horizontal
              highlightRangeMode: ListView.StrictlyEnforceRange
              snapMode: ListView.SnapToItem
              boundsBehavior: ListView.StopAtBounds
              currentIndex: 149
              onMovementEnded : {
                  list.positionViewAtIndex(149, ListView.Beginning)
              }
              keyNavigationWraps: true
              //
              pressDelay: 200
              //
              delegate:
                      Flickable {
                  flickableDirection: Flickable.VerticalFlick
                  width: 480
                  height: 1800
                  //
                  pressDelay: 200
                  //
                  Rectangle {
                      width: 480
                      height: 900
                      border.width: 3
                      border.color: 'red'
                      Rectangle {
                          y: 100
                          anchors.horizontalCenter: parent.horizontalCenter
                          width: 200
                          height: 100
                          color: 'green'
                          Text {
                              text: 'Click here'
                              anchors.centerIn: parent
                              color: 'white'
                              font.pixelSize: 30
                          }
                          MouseArea {
                              anchors.fill: parent
                          }
                      }
                  }
              }
          }
      }
      

      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)
            clivewhitear Clive Whitear
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes