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. QHash vs QQmlPropertyMap
Qt 6.11 is out! See what's new in the release blog

QHash vs QQmlPropertyMap

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt5qmlqhashqqmlpropertymapmetatype
1 Posts 1 Posters 611 Views 2 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.
  • T Offline
    T Offline
    texasRanger
    wrote on last edited by
    #1

    Hello,

    I have been trying to do research on these and others (QMap). There is good information on QHash and QMap and when to use one over the other. However, I have not found a lot on QQmlPropertyMap. I have a program where I will store key value pairs into one of these data structures and then access the values, by key, in qml for the UI. I was going to use QHash since speed and scalability is a big consideration to my program. However, QQmlPropertyMap seems to be a much simpler way to "expose" C++ key/values to qml. I know with QHash you need to register it with the Qt metatype system, so if anybody has any suggestions on how to do that. Does QQmlPropertyMap also use a binary search through sorted keys like QMap?

    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