Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Flickable QML Gridview: Transmit Release Event to items



  • Hi,

    I have a flickable GridView which displays 6 buttons on the screen, and I have 24 buttons which I can reach via flicking the GridView sideways. If I press a button, its border changes color, and after a release it changes back to the original color.

    My problem is the following: If I press on a button and start moving sideways, flicking the GridView gets activated (which is what I want). However, if I release the button, the release event is not captured by the button anymore and thus the border color does not go back to the original state. How can I get the release event to my button?



  • @maxwell31
    Maybe you could change the border using the MouseArea's containsPress property instead?



  • You can give the color to the button like:

    borderColor: button.pressed ? "red" : "blue" (for example)


Log in to reply