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

Android: Qt Quick Controls 2 button autorepeat goes into infinite loop if disabled while pressed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.0 Beta 1
    • 5.8.0 Beta, 5.8.0 RC
    • Quick: Controls 2
    • None
    • 16389a1f247f14965ed0286e4fdab6bc2b1621bc

    Description

      A button from QtQuick.Controls 2 with autoRepeat on Android never stops generating click events if it becomes disabled while being pressed. I noticed this bug in Qt 5.8-beta and 5.8-rc. It used to work well with Qt 5.6 on Android and it works well with Qt 5.8-rc on Linux.

      Here is a small example to reproduce the bug, press the Increment button and release it after it is disabled. It will go into an infinite loop.

      import QtQuick 2.0
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          property int count
      
          visible: true
      
          Column {
              Button {
                  enabled: count > 0
                  text: "Decrement"
                  autoRepeat: true
                  onPressed: --count
              }
              Button {
                  enabled: count < 10
                  text: "Increment"
                  autoRepeat: true
                  onPressed: ++count
              }
              Label {
                  text: count
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              frederik Frederik Gladhorn
              enz Markus Enzenberger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes