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

handling mouse events in QQuickView



  • I render my 3d model under qml controls using QQuickView::beforeRendering event
    I want to do my mouse events handling if user clicks outside any of qml controls/ How can I found out in, for example, QQuickView::mousePressEvent that mouse is pressed under qml control?



  • Hi,
    you could simply place a big MouseArea under all your other controls.



  • Thank you for your answer!
    I found even more simple solution - check QQuickItem::childAt for null. If it isn't null then I call inherited QQuickView::mousePressEvent method, otherwise I do my own work


Log in to reply