i am loading the keyboard.qml in QQuickView and then add it to a widget, but when I click on any key i got a warning input method is not set.
I looked at the documentation and it did not show how to create a custom input method, I want to override the keyEvent and write my logic there.

QQuickView view(QString("qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml"));
if (view.status() == QQuickView::Error)
return -1;
view.setResizeMode(QQuickView::SizeRootObjectToVie w);


QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget(w1);

QWidget* w = new QWidget;
w->setLayout(layout);
w->show();