问题
As I see, the virtualKeyboard (plugin) sends touch and click event when qml application is running over WegGL-stream. Now I've trouble finding an easy workaround.. Does anyone have a good idea? Further is it a virtualKeyboard or a QPA-Plugin bug?
Tried with QT 5.13.0, MSVC2017 64Bit / MinGW 64Bit compiler, Windows10, Chrome 76.0.3809.132 64Bit / Firefox. If application is not running over WebGL-stream, everthing works fine in terms of touch and click events.
// Tests with QT Quick Virtual Keyboard example with extended main.cpp..
int main(int argc, char *argv[])
{
qputenv("QSG_RENDER_LOOP","threaded");
qputenv("QT_QPA_PLATFORM", "webgl:port=1051");
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
QGuiApplication app(argc, argv);
QQuickView view(QString("qrc:/%2").arg("basic-b2qt.qml"));
if (view.status() == QQuickView::Error)
return -1;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.show();
return app.exec();
}
来源:https://stackoverflow.com/questions/57783448/qt-webgl-stream-virtualkeyboard-and-touch-screen-problem