Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. handling mouse events in QQuickView
Forum Updated to NodeBB v4.3 + New Features

handling mouse events in QQuickView

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 840 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rem-Kolomna
    wrote on last edited by Rem-Kolomna
    #1

    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?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rem-Kolomna
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved