Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How pass part of the mouse events through a top-level window of my application to the windows below.

How pass part of the mouse events through a top-level window of my application to the windows below.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.6k Views
  • 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.
  • A Offline
    A Offline
    akerka
    wrote on last edited by
    #1

    Good evening.
    Half of my top-level window is transparent, except for a few sites. I want to ensure that mouse events occurring on that half had passed through my application and reach of applications under him.
    I found that event->ignore() does not effect a top-level window. Does anyone know anything on which side to approach this problem?
    Thanks in advance for the tip.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      I'm not sure if windowing systems are geared towards doing what you want. event->ignore() indeed only works for the current widget. After that, all places where that event might be delivered further should be ignoring the event and even then I'm not sure whether you will actually see the mouse event passed to the window behind your application.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • A Offline
        A Offline
        akerka
        wrote on last edited by
        #3

        Similar effect using dock in macos. When the cursor over the icon, its height increases and the like beyond the dock. In this case, the icon is superimposed on the window behind the dock. One of two things: either dynamically increase the size of dock or dock itself decides which events to skip through it.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Only one window can have the mouse events (leaving grabMouse() out at the moment). This window is the topmost one where the mouse position is.

          event->ignore() only works for the current widget resp. application. If it was passed to the next application/window by the window system, you could destroy your hard disk and even not now about it, because all dialogs you happen to click on are invisible!

          Are you sure, you really want to do that? Such behavior (clicking on the window on top and actually clicking a window below) could be regarded odd.

          http://www.catb.org/~esr/faqs/smart-questions.html

          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