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

Let Flickable inherit from a MouseArea

    XMLWordPrintable

Details

    Description

      Hi,

      My case is as follows. I have a ListView (and GridView, but lets keep it on the ListView for now) where i disable flicking by setting boundsBehavior: Flickable.StopAtBounds. Thus far that works just fine.

      Now i want to get notified when i click on my ListView area with my mouse. Just anywhere without clicking on one of the items i have inserted. Right now there is no option to get such an event other then adding a MouseArea over the entire ListView.

      To me that seems a bit redundant. ListView inherits from Flickable by design and Flickable inherits from Item. I think that should change. A Flickable should inherit from a MouseArea thus exposing all MouseArea signals to everything that inherits from Flickable.

      Can this be added in Qt 5.1?
      Or perhaps even in Qt 5.0? It really seems to be a change as simple as changing:

      class Q_QUICK_PRIVATE_EXPORT QQuickFlickable : public QQuickItem
      to
      class Q_QUICK_PRIVATE_EXPORT QQuickFlickable : public QQuickMouseArea

      and adding an include for the QQuickMouseArea in the QQuickFlickable header.

      Cheers,
      Mark

      Attachments

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

        Activity

          People

            416365416c Alan Alpert
            markg85 Mark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes