Well, that's the way I did it first, too. You can also declare your signal&slot as Q_PROPERTY() for your C++ QObject. If you define the READ and WRITE and NOTIFY methods for the Q_PROPERTY, you can then treat it as a "normal" object in QML. So write in C++ class declaration something like
Q_PROPERTY(QString numberToDial READ getNumberToDial WRITE dialSlot NOTIFY dialSlignal
)
Q_PROPERTY(QString numberToDial READ getNumberToDial WRITE dialSlot NOTIFY dialSlignal)
To copy to clipboard, switch view to plain text mode
then you can write in QML:
myDialpad.numberToDial = "12345"
myDialpad.numberToDial = "12345"
To copy to clipboard, switch view to plain text mode
Bookmarks