Solved get c++ signal parameter in QML
-
hi,
is there a way to get the parameter of a signal in QML without having a Q_PROPERTY ?i only have this in c++
signals : void valueRead(int val); ... emit valueRead(10)
an object of this class is exposed to QML with setContextProperty
can i get it in QML ?
Connections{ target: cppObj onValueRead: console.log("value is : " /* + ?*/) }
thx
-
signal paramenter name is same as the one you declared in signal at C++. Connections{ target: cppObj onValueRead: console.log("value is : " +val) }
-
signal paramenter name is same as the one you declared in signal at C++. Connections{ target: cppObj onValueRead: console.log("value is : " +val) }
-
@dheerendra thank you ! i just noticed that too
-
please , can i use serialport with android , i work with qt Qml ,Kit armv7?
-
@Jadi-Nabil please do not highjack other people thread with unrelated questions.