Qt Quick 5.3.2 wheel event cascade



  • Hi,
    Just updated to Qt 5.3.2 (from 5.3.0) and have some problems with the scroll wheel behavior. Mouse scrolling on a Slider inside a ScrollView affect both the Slider and the ScrollView at the same time.

    This behavior is visible everywhere the event is not accepted. Look like the wheel event now cascade on underlaying widget. But we cannot accept this event with the QtQuick Controls. That would be nice to have a hook to accept the event or a switch to auto accept wheel event. The Slider.qml inside Qt cannot be modified, since it only pass the horizontalDelta or the verticalDelta to the WheelArea onVerticalWheelMoved and onHorizontalWheelMoved. So no event or wheel parameter are there to accept the event :-( Would need to change the API to fix this. Maybe the WheelArea should give the event into parameters just like the MouseArea.

    Maybe I am missing something, but I don't want to put a Mouse Area under each controls just to accept the wheel event and stop it's propagation. I understand there must be some use case to perform the event that way, but a way to select between cascading or not would be welcome, would be even better if could be done into the Control itself. Here's a simple example to display the problem:

    @
    import QtQuick 2.3
    import QtQuick.Controls 1.2
    import QtQuick.Controls.Styles 1.2

    Rectangle
    {
    ScrollView
    {
    width: 300
    height: 300
    Column
    {
    Rectangle { width: 500; height: 500; color: "red" }
    Slider { }
    Rectangle { width: 500; height: 500; color: "blue" }
    }
    }
    }
    @

    [edit: added missing coding tags @ SGaist]


  • Lifetime Qt Champion

    Hi,

    Sounds like a strange behavior. You should try asking on the interest mailing list. You'll find there Qt's developers/maintainers (this forum is more user oriented)



  • Hi,
    Not to sound rude, but that seem like user oriented to have some explaination for the behaviors (if this is not intended, I would open a bug, else I would like to know how one could use it properly).
    I guess I should use the interest mailing list?! No Qml oriented list that I can see of on http://lists.qt-project.org/mailman/listinfo

    Thanks anyway


  • Lifetime Qt Champion

    You don't, don't worry. I meant that it sounded like a regression since the behavior changed between two versions so asking directly to the Qt developers/maintainers would be more sensible.



  • Sadly, did not got any answer there. Here's the associated bug report:
    https://bugreports.qt-project.org/browse/QTBUG-42273



  • Sadly, did not got any answer there. Here's the associated bug report:
    https://bugreports.qt-project.org/browse/QTBUG-42273


  • Lifetime Qt Champion

    You should add a minimal compilable example to the bug-report, that will help fixing the bug


  • Lifetime Qt Champion

    You should add a minimal compilable example to the bug-report, that will help fixing the bug


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.