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. QML does deep copy for QVariantMap
Forum Updated to NodeBB v4.3 + New Features

QML does deep copy for QVariantMap

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 579 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.
  • E Offline
    E Offline
    equeim
    wrote on 12 Feb 2017, 13:11 last edited by
    #1

    In my code I need to pass data in QByteArray and QVariantMap types between objects that are instaniated in QML. I do it by declaring Q_PROPERTY inside object with data and calling a Q_INVOKABLE method of another object. It works fast with QByteArray because of implicit sharing, but I discovered that for QVariantMap QML does deep copy instead of shallow. I solved it by passing a QObject pointer and calling getter method in C++ code. However I wonder if there is a better way to do this?

    1 Reply Last reply
    0

    1/1

    12 Feb 2017, 13:11

    • Login

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