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. How to create custom QQuickItem instance and add it to parent in c++?
Forum Updated to NodeBB v4.3 + New Features

How to create custom QQuickItem instance and add it to parent in c++?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 554 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.
  • tracymaT Offline
    tracymaT Offline
    tracyma
    wrote on last edited by
    #1

    I have two custom QQuickItems, one as parent and one as child. I want to create the child instance in c++, then add it to parent which is instanced in QML

    tracymaT 1 Reply Last reply
    0
    • tracymaT tracyma

      I have two custom QQuickItems, one as parent and one as child. I want to create the child instance in c++, then add it to parent which is instanced in QML

      tracymaT Offline
      tracymaT Offline
      tracyma
      wrote on last edited by tracyma
      #2

      OK, find some useful doc http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html#loading-qml-objects-from-c

      https://stackoverflow.com/a/26705694/853569

      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