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

[REG 5.8->5.9] onPressAndHold got broken in many item types

    XMLWordPrintable

    Details

    • Commits:
      37f3ed96eb6f41d2b9fc34f64725dd754bb627a8

      Description

      After upgrading from Qt 5.8 to Qt 5.9 the onPressAndHold event is not working properly.
      Affected item types are MouseArea, ItemDelegate, TextArea, and probably all others that implement this event.
      The behavior of this event also depends on the window type:
      1) When 'Window' is used, the event is:
      1.a) not triggered at all when ItemDelegate is clicked first time, and triggered immediately (like as if it was the onClicked event) when ItemDelegate is clicked 2nd, 3rd, ... times.
      1.b) triggered immediately on mouse click in MouseArea

      2) When 'ApplicationWindow' is used, the event is:
      2.a) for ItemDelegeate the behavior is same as as in 1.a)
      2.b) not triggered at all when clicking inside MouseArea

      In all cases, the following message is printed immediately after clicking the items:
      GLib-GObject-WARNING **: g_object_get_valist: object class 'GtkSettings' has no property named 'gtk-long-press-time'

      The bug could be related to QTBUG-60123.
       

      import QtQuick 2.8
      
      import QtQuick.Controls 2.1
      //import QtQuick.Window 2.2
      
      ApplicationWindow {
      //Window {
          visible: true
          width: 640
          height: 480
      
          MouseArea {
              anchors.fill: parent
              onPressAndHold: console.log("press and hold")
          }
      
      //    ItemDelegate {
      //        anchors.fill: parent
      //        onPressAndHold: console.log("press and hold")
      //    }
      }

        Attachments

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

          Activity

            People

            Assignee:
            smd Jan Arve
            Reporter:
            j0hnny j0hnny
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes