Handle "byte" and "unsigned int" in QML



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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.