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 C++ uint32 and uint64
Qt 6.11 is out! See what's new in the release blog

Qml C++ uint32 and uint64

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 1.6k 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.
  • S Offline
    S Offline
    Shazter001
    wrote on last edited by
    #1

    Hello, i would like to know how to deal with this data types (uint32 and uint64), because Qml Basic Types doesn't support this C++ types.

    Qml Int values range from around -2000000000 to around 2000000000
    C++ uint32 values range from 0 bis 4.294.967.295

    I need to show, edit, subtract, add, multiple and divide such kind of Data in the GUI.

    I hope you can give me some advice how to deal with non-supported c++ types in qml

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      A - perhaps poor - solution would be to convert these numbers to string and work on strings in QML (display them). For mathematical operations, go back to C++ and do the maths there. So, a custom QML type created in c++ (a QObject should be enough for that) and exported to the engine should do the trick.

      (Z(:^

      1 Reply Last reply
      3

      • Login

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