Another question on same QML...
-
There are references in the QML file:
Item { id: root property var theme : isDarkTheme ? Dark : Light property double heading : vehicle.data.heading ? vehicle.data.heading : 0
I cannot see any mention of vehicle in the file except to read its content, how can I find out where it comes from?
-
There are references in the QML file:
Item { id: root property var theme : isDarkTheme ? Dark : Light property double heading : vehicle.data.heading ? vehicle.data.heading : 0
I cannot see any mention of vehicle in the file except to read its content, how can I find out where it comes from?
@SPlatten ah, welcome to qml :D
Two options:
-
(Let's hope for this one) vehicle is a c++ object registered ContextProperty. If thats the case, you'll have somewhere a in your c++ files a setContextProperty call. Usually where your QmlEngine is instantiated. main.cpp)
-
It is a custom property, defined anywhere in the parent/child hierarchy of any of the parents. Good luck finding it.
-
-
@SPlatten ah, welcome to qml :D
Two options:
-
(Let's hope for this one) vehicle is a c++ object registered ContextProperty. If thats the case, you'll have somewhere a in your c++ files a setContextProperty call. Usually where your QmlEngine is instantiated. main.cpp)
-
It is a custom property, defined anywhere in the parent/child hierarchy of any of the parents. Good luck finding it.
@J-Hilk , thank you, I searched the entire source for
setContextProperty
and found lots of other references but sadly not for "vehicle".Found it I think, there is a helper function that calls
setContextProperty
where one of the parameters passed into it is "vehicle". -