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

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.