Question

Considering : http://doc.qt.io/qt-4.8/qdeclarativebasictypes.html there is no strict equivalent of "byte" in QML.

Nonetheless, I have to manipulate some datas in a whole project, and QML file are an intermediate for communications. And some of these datas are some byte...

What can I do ?

(found some links about QVariant but I don't feel like I can use it in QML)

Was it helpful?

Solution

If you don't actually use those bits in QML you might be able to save in an integer and then get those back.

OTHER TIPS

I've already seen your question in Qt forum, but left with the intention that someone with better knowledge can help you.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top