Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Clone item from ObjectModel
Qt 6.12 LTS is out! See what's new in the release blog

Clone item from ObjectModel

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlitemmodel
1 Posts 1 Posters 727 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.
  • MasterBLBM Offline
    MasterBLBM Offline
    MasterBLB
    wrote on last edited by MasterBLB
    #1

    Hi mates

    I have an ObjectModel then I get an item using model.get(someIndex). Now my question is - how to clone the item, and display freshly created one in other place? loader.sourceComponent = itemFromModel; returns Error: Cannot assign QObject* to QQmlComponent*, while Qt.createQmlObject() and Qt.createComponent() are unsuitable for the task. I'm out of ideas what I can use.

    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
    • Unsolved