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. I want to stop stealing MouseSignal of Flickable
Forum Updated to NodeBB v4.3 + New Features

I want to stop stealing MouseSignal of Flickable

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.6k 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.
  • D Offline
    D Offline
    dFrontia
    wrote on last edited by
    #1

    I have asked the advice of competent.

    I want to work at the same time, the two overlapped Flickable.
    Or flick while, I want to do the child elements.

    I know that it is to look at the source code of Flickable, may be set to False to setKeepMouseGrab.

    However, the way that I do not know.

    Although I think I have to modify the source code to rebuild the Qt library,
    If can, I do not want it

    Are looking for a way to realize the only description of QML source code.

    I also want to inform Flickable child elements mouse signals during operation.
    I do not want to modify the library for so small a matter.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Quite hard to understand your post, but I think what you are looking for is:
      @
      Flickable {
      interactive: false
      }
      @

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dFrontia
        wrote on last edited by
        #3

        sierdzio thanks for replay.

        If false the interactive property, flick operation is not accepted it.

        @
        Flickable {
        id:parent1
        flickDirection:horizontal

        Rectangle{
        Flickable{
        x:0
        width:1000
        id:child1
        flickDirection:vertical
        }
        Flickable{
        id:child2
        x:1000
        width:1000
        flickDirection:vertical
        }
        }
        }
        @

        during operation is parent1,child1,child2 can not be operated.
        and during operation is child1, parent1 can not be operated.

        I want to work at the same time and both child1/parent1. or child2/parent1

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You have to decide and force Flickable into submission, but it will not magically do what you want it to :)

          What I would do here, probably (apart from maybe rethinking the design), is to set partent1.interactive to false when any of the children Flickables are operating (in onFlicking slot, or onFlickingStarted and onFlickingStopped), and then turn it on again. You can also introduce some delay to the whole process, so that the user is not confused. But I'm not sure.

          Alternative, more akin to what you want to achieve, would be to force Flickable (in children) not to accept the drag events, so that it continues up the hierarchy and is invoked in parent1, too.

          (Z(:^

          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