QCoreApplication::sendEvent does not work with QML
I use QCoreApplication::sendEvent (QObject * receiver, QEvent * event) to send KeyEvent to QML TextInput.
For sone reason TextInput does not catch the event.
Anyone know why ?
could you post some code please ?
Well, how did you get a pointer _textInputPtr on your QML element ?
How did you connect with the Context or with DecalrativeView?
please post the complete code....
textInputPtr is the id of the TextInput from the QML.
I made a c++ item which inherits QWidget and used on QML (i registered it)
You cannot use QML id in C++, that don't make any sense.
May i ask you what kind of thing you want to achieve with your textInput?
The qML id is a pointer to QObject.
I want to use a c++ virtual keyboard on QML
How about sending a mouse event? e.g. https://gist.github.com/4415306
But I want to send Key event
At least with Qt5, one working solution seemingly is to use receiver->window()->sendEvent(),
as depicted at https://bugreports.qt-project.org/browse/QTBUG-15496 .