Receiving signals with arguments in QML from C++

From Qt Wiki
Revision as of 17:36, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Receiving signals with arguments in QML from C++

The example code below shows how you can receive signals with arguments in QML from C++. The important thing to notice in the example is that the signal’s argument needs to be named identically in QML and in C++. So in this example it needs to be referred to as “text” both places, otherwise you will receive errors.

main.cpp
main.qml

Categories: