Can a QVector type data be sent from a C++ file to a QML file?
-
There are 16 yields of type int, instead of specifying these data with the "Q_PROPERTY" command one by one, I specify them as " Q_PROPERTY(QVector<int>". When trying to get this data by QML, the first value is correct, then the program closes.
Is QVector deprecated when sending data in QTc++ code
Q_PROPERTY(QVector<int> sys_time READ sys_time WRITE setSys_time NOTIFY sys_timeChanged)QML code
text: main_ros.sys_time[5].toString() -
There are 16 yields of type int, instead of specifying these data with the "Q_PROPERTY" command one by one, I specify them as " Q_PROPERTY(QVector<int>". When trying to get this data by QML, the first value is correct, then the program closes.
Is QVector deprecated when sending data in QTc++ code
Q_PROPERTY(QVector<int> sys_time READ sys_time WRITE setSys_time NOTIFY sys_timeChanged)QML code
text: main_ros.sys_time[5].toString()@serkan_tr
Could the vector be empty at the time the QML file is loaded? -
@serkan_tr
Could the vector be empty at the time the QML file is loaded?@Asperamanca I fill the constructor function gets the initial value correctly but it closes when the value changes
-
@Asperamanca I fill the constructor function gets the initial value correctly but it closes when the value changes
@serkan_tr
I would implement a console.log in QML to see what QML actually sees, and when. If the vector ever has less items than you expect, that's a crash. -
@serkan_tr
I would implement a console.log in QML to see what QML actually sees, and when. If the vector ever has less items than you expect, that's a crash.@Asperamanca I removed QVector, I wrote all of them one by one, it is giving an error now
-
S serkan_tr has marked this topic as solved on