Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Conflict between QScroller and QScrollBar

Conflict between QScroller and QScrollBar

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.2k 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.
  • W Offline
    W Offline
    Wahsekim
    wrote on last edited by
    #1

    I found a conflict between QScroller and QScrollBar. So I have a QScrollArea with vertical scrollbar. I also activate a QScroller that allows me to do kinetic scrolling with left click button. But I can't grab the scrollbar handle any more. Because once I grab it, QScroller begins to take over. This is how I add the QScroller:

    @QScroller::grabGesture(mArea, QScroller::LeftMouseButtonGesture) ; @

    Any idea how can I solve the conflict?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hBovine
      wrote on last edited by
      #2

      This is just a last resort, but you should be able to do QScoller::ungrabGesture() on the QScrollBar::mousePressEvent()

      Haven´t tested this though.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wahsekim
        wrote on last edited by
        #3

        [quote author="hBovine" date="1400185916"]This is just a last resort, but you should be able to do QScoller::ungrabGesture() on the QScrollBar::mousePressEvent()

        Haven´t tested this though.[/quote]

        It's the right way to start.
        I redefined enterEvent and leaveEvent to dis dis-activate and re-ractivate QScrollers. Works fine. Thanks.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I would experiment with registering the QScroller not on the whole QScrollArea, but only on the client area. Or, try to use an event filter on the scrollbar.

          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