implement flickable scrolling on a custom opengl item
-
Hey guys,
I have an opengl component based on QQuickFramebufferObject which I place on a qml window.
Now I want to implement mouse (or touch) interaction to scroll inside my component. This scrolling should act like a flickable surface.Is there a component I could use to animate the deceleration and bouncing?
Something where I set the content-dimension and with a signal that I just have to connect to my position slot?Thanks
CU
mts -
Hi themts,
you could place a Flickable (http://doc.qt.io/qt-5/qml-qtquick-flickable.html) on top of your scene view and connect the Flickable's properties (contentX, contentY, horizontalVelocity, etc) to your view to control it. You have to set a transparent dummy item with proper geometry as the content item of the Flickable to make this work.