QT WebGL-stream, virtualKeyboard and touch screen problem

让人想犯罪 __ 提交于 2021-02-08 07:41:52

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!