Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Input Problems: QML app added to QGraphicsView only works via double click



  • Hello,
    I added a QML application to a QGraphicsView instance in my project using this:
    @
    qmlView = new QDeclarativeView;
    qmlView->setSource(QUrl::fromLocalFile(("main.qml")));
    qmlView->setAttribute(Qt::WA_TranslucentBackground);
    qmlView->setStyleSheet(backgroundStyle);
    QGraphicsProxyWidget* qmlWidget = scene()->addWidget(qmlView);
    @

    It works but the problem is that I have to double click items in the QML to get them to work now whereas in the original QML app, a single click works.
    I also have a webview embedded in the QML and the input problem is preventing me from interacting with rendered pages.

    Please is there any setting I may have missed or do I have to implement the mouse events if the QGraphicsView someway to manully fix this?


Log in to reply