implement flickable scrolling on a custom opengl item
-
wrote on 11 Mar 2015, 16:21 last edited by
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 -
wrote on 11 Mar 2015, 23:34 last edited by
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.
-
wrote on 12 Mar 2015, 20:24 last edited by
hmm, not a very elegant way...
I'm more interested in a c++ class.
3/3