Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] Custom layouting
QtWS25 Last Chance

[Solved] Custom layouting

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.4k 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.
  • V Offline
    V Offline
    VitaminC
    wrote on last edited by
    #1

    Hi,

    As I understand, you can add custom shapes in Qml (QtQuick 2) with QQuickItem/QQuickPaintedItem...
    But is there a way to implement custom views/containers in C++ ? Like some QQuickContainer class ?

    How does one implement some complex/dynamic layouting (treeview, mindmapview) in Qml ?

    Alternatively, is there a way to embed Qml shapes/nodes into a complex OpenGL view ? (the opposite is described here : http://qt-project.org/doc/qt-5.0/qtquick/scenegraph-openglunderqml.html )

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      There is nothing particularly magic about implementing custom views that separate them from implementing custom shapes in C++. Any QQuickItem can be a container with children so there is no special container class. You would simply derive from QQuickItem and operate on the x and y coordinates of child items.

      That said, it will probably take a bit more effort to get it working properly. As a starting point, you could take a look at the existing implementations of Row or Column in the qt sources. (qquickpositioners)

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VitaminC
        wrote on last edited by
        #3

        Thanx for the suggestion =)

        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