Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Flickable QML Gridview: Transmit Release Event to items

Flickable QML Gridview: Transmit Release Event to items

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 554 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxwell31
    wrote on last edited by
    #1

    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?

    DiracsbracketD 1 Reply Last reply
    0
    • M maxwell31

      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?

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • O Offline
        O Offline
        Ovidiu Vasilca
        wrote on last edited by
        #3

        You can give the color to the button like:

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved