How can I send keyevent into a qml textedit?
-
sendEvent function requires reciever to be a QObject and textEdit item inherits QObject so you can still send event to textEdit. only thing you need to do is get access to textEdit from a c++ code and send events from there to textedit. For getting access to qml items in C++ please check http://doc.qt.nokia.com/4.7-snapshot/qtbinding.html
-
well if your textEdit is in focus and only then you want to send the events then you can send event directly to the QDeclarativeView itself, QDeclarativeView should take care of forwarding keyevent to textEdit.
QCoreApplication::sendEvent(declarative_view, keyEvent);