Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. how to handel multiple touch event on Qscroller ?
Forum Updated to NodeBB v4.3 + New Features

how to handel multiple touch event on Qscroller ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 528 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
    Qt embedded developer
    wrote on last edited by
    #1

    i have used grab gesture function for scrolling menu items.

    when i scroll and hold gesture at same time i am able to click on back ground of scroller. how to disable that click?

    Q 1 Reply Last reply
    0
    • Q Qt embedded developer

      i have used grab gesture function for scrolling menu items.

      when i scroll and hold gesture at same time i am able to click on back ground of scroller. how to disable that click?

      Q Offline
      Q Offline
      Qt embedded developer
      wrote on last edited by
      #4

      @Qt-embedded-developer

      below code helped me to avoid multi touch while scroll

      QScrollerProperties qScrollerProperties;
      QVariant overshootPolicy = QVariant::fromValueQScrollerProperties::OvershootPolicy(QScrollerProperties::OvershootAlwaysOff);
      qScrollerProperties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, overshootPolicy);
      QScroller* qScroller = QScroller::scroller(ui->treeWidgetSession);
      qScroller->grabGesture(ui->treeWidgetSession, QScroller::LeftMouseButtonGesture);
      qScroller->setScrollerProperties(qScrollerProperties);

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        Do you mean to make QMneu stay open even if clicked ?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qt embedded developer
          wrote on last edited by Qt embedded developer
          #3

          i mean to say how to stop QScroller hold and click event at same time

          1 Reply Last reply
          0
          • Q Qt embedded developer

            i have used grab gesture function for scrolling menu items.

            when i scroll and hold gesture at same time i am able to click on back ground of scroller. how to disable that click?

            Q Offline
            Q Offline
            Qt embedded developer
            wrote on last edited by
            #4

            @Qt-embedded-developer

            below code helped me to avoid multi touch while scroll

            QScrollerProperties qScrollerProperties;
            QVariant overshootPolicy = QVariant::fromValueQScrollerProperties::OvershootPolicy(QScrollerProperties::OvershootAlwaysOff);
            qScrollerProperties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, overshootPolicy);
            QScroller* qScroller = QScroller::scroller(ui->treeWidgetSession);
            qScroller->grabGesture(ui->treeWidgetSession, QScroller::LeftMouseButtonGesture);
            qScroller->setScrollerProperties(qScrollerProperties);

            1 Reply Last reply
            1

            • Login

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