Unsolved Kinetic scrolling via mouse wheel
-
Hey all,
I have a subclassed
QTableWidget
with some rows and I would like to scroll though it smoothly. I have tried usingQScroller
which seems to be class of choice for this kind of problem but I wasn't able to achieve what I wanted.I was only able to get kinetic scrolling when clicking at a row and then moving the mouse up (like touching a list of the smartphone). What I would like to achieve is pretty much the same but with scrolling the mouse wheel instead.
Is there a way to do this with the predefined class or do I need to implement this myself?
-
@jsmolka
You don't say whether you are using desktop or mobile (assume desktop because of mousewheel?).Articles like:
https://falsinsoft.blogspot.co.uk/2015/09/qt-snippet-use-qscroller-with.html
http://www.qtcentre.org/threads/55778-Scrolling-using-QScroller-class
seem to suggest it should work with desktop mouse, or give hints for code.Just checking you've read them.
-
Yes. I am on PC and those articles don't really help. I want to scroll the mouse wheel and have a
QScroller
like effect. From what I've readQScroller
only supports the left and right mouse button because it wants them to be pressed. I wasn't able to find something about the mouse wheel anywhere online. -
@jsmolka
This is way beyond my pay-grade, but at the end of the day if it's really the case thatQScroller
doesn't do what you want with mousewheel, can you not intercept those events and do your ownQScrollBar::setValue()
directly if there's no other way? I leave this possibitily with you.