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. Disable Delegate's MouseArea until ViewTransitions have finished

Disable Delegate's MouseArea until ViewTransitions have finished

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.0k Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    qwasder
    wrote on last edited by
    #1

    Hi all,

    I have a ListView that plays "add-" and "displaced-" transitions when adding an item.

    I want the item-delegate's MouseArea to be disabled until all transitions for this add have finished, to avoid complications.
    What would be the best way to do this?

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      One way would be to enable/disable the MouseArea in onRunningChanged handler or bind that Transition's running to that of MouseArea's enabled.

      157

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qwasder
        wrote on last edited by
        #3

        [quote author="p3c0" date="1425104278"]Hi,

        One way would be to enable/disable the MouseArea in onRunningChanged handler or bind that Transition's running to that of MouseArea's enabled.[/quote]
        Can I even access a delegate's properties from the ListView at that time?

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          No need for that just bind the runnig property.
          @
          ListView {
          ...
          delegate: Rectangle {
          ...
          MouseArea {
          anchors.fill: parent
          enabled: !myTrans.running
          }
          }
          ...
          add: Transition {
          id: myTrans
          NumberAnimation { properties: "y"; from: 100; duration:5000 }
          }
          }
          @

          157

          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