Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

defining constants for use in qml

$
0
0
Hi I am just getting started in qml. I have some c++ bindings in QML and i have some function like Myqmlhelper.getiovalue( 40,15) that i call from QML So i would like to now if qml supports declaring defines like in C, so i can write Myqmlhelper.getiovalue( PUMP,15) instead of Myqmlhelper.getiovalue( 40,15). in C i would have #define PUMP 40 how can i do that in QML ? Or should i use enums in c++ instead of #defines and if so can i use them (enums) from QML ? Johan

Viewing all articles
Browse latest Browse all 13965

Trending Articles