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. Handle "byte" and "unsigned int" in QML
Qt 6.11 is out! See what's new in the release blog

Handle "byte" and "unsigned int" in QML

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

    Hello here,
    I have to admit I'm quite a rookie in the Qt/QML world but in my project, I'm using QML files to describe my graphical elements in my C#/WPF main project.

    Everything works fine at the moment but the the thing is that I'll have to handle the following types now : "byte" and "unsigned int" and I've no idea about how to do it...

    I'm using the properties of QtObjects to handle the other types (string, int, bool, etcetc...) but considering :
    http://doc.qt.nokia.com/latest/qdeclarativebasictypes.html
    there are no byte or unsigned int :(

    How can I go over it ?

    I found some infos about Qvariant/variant but I don't feel like that's what I want...

    Thanks in advance for any help !
    (I hesitated to post this in this section, I'm not sure this is the appropriate one, sorry if that's the case)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raja26
      wrote on last edited by
      #2

      Could you please tell about your necessity to use a byte in QML. If it is going to be standalone application, you can handle (and only can - I think) it using a C++ datatype like char and display/present it from the QML side.

      If it just going to be a QML file, then I think you have to create a byte like object with Qt C++ and use it to store the values.

      I definitely don't think that QML can handle file operations, neither can it access any serial port services. So the C++ can handle these situations without any difficulties.

      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