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

Qt6 MouseArea does not get events when it is inside background item of QuickControl element.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P1: Critical
    • None
    • 6.3.0
    • None
    • Linux
    • Linux/X11

    Description

      This is a regression between Qt5 to Qt6 or perhaps a change of behaviour.

      I have nodes defined in a flickable. Each node is a QtQuickControl pane.

      I need to be able to drag those nodes. So I put a mousearea inside the background Item to make sure the mousearea has the same geometry than my node. It works perfectly with Qt5 but in Qt6 the event are stolen by the flickable (I guess).

      The only way to make it work, it's to put the mousearea into contentItem of the QtQuickControl pane. But In this case, the mouse area follows the padding rule and it required many workarounds to get the full space. It produces verbose code (Qt: Code less, create more).

      Please take a look to the simple example and the two gif files, I provided. And please keeps in mind that the code is strictly identical in the Qt5 and Qt6  version.

       

      If the Qt6 behaviour is the one you want to keep, please add information into documentation:

      https://doc.qt.io/qt-6/qml-qtquick-mousearea.html#preventStealing-prop
      Reading the documentation: preventinStealing should fix it but it does not.

       

       

      Attachments

        1. flickableTestQt6.zip
          11 kB
        2. Qt5_good.gif
          Qt5_good.gif
          133 kB
        3. Qt6_bad.gif
          Qt6_bad.gif
          297 kB

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              obiwankennedy renaud.guezennec
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes