Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    implement flickable scrolling on a custom opengl item

    QML and Qt Quick
    flickable
    2
    3
    979
    Loading More Posts
    • 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.
    • T
      themts 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

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User 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.

        1 Reply Last reply Reply Quote 0
        • T
          themts last edited by

          hmm, not a very elegant way...
          I'm more interested in a c++ class.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post