Receiving signals with arguments in QML from C++: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 17:36, 14 January 2015

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: