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. Pass a dynamically created QML object to a C++ function as a QDeclarativeItem
Forum Updated to NodeBB v4.3 + New Features

Pass a dynamically created QML object to a C++ function as a QDeclarativeItem

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 865 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    piggz
    wrote on 21 Sept 2012, 17:14 last edited by
    #1

    From what ive read so far, an object can be be passed as a QDeclarativeitem* using its ID. Can this be done for a dynamically created object that was created using something like:
    component = Qt.createComponent("somefile.qml");
    var obj = component.createObject(parent);

    Passing obj as the argument seems to result in a null pointer, any other ideas/tips?

    Thanks

    1 Reply Last reply
    0
    • P Offline
      P Offline
      piggz
      wrote on 21 Sept 2012, 18:44 last edited by
      #2

      My error...what i said doesnt work actually works perfectly!

      1 Reply Last reply
      0

      1/2

      21 Sept 2012, 17:14

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved