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. Translucent top widget - mouse events

Translucent top widget - mouse events

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 738 Views 1 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.
  • T Offline
    T Offline
    Talei
    wrote on last edited by
    #1

    Hello,
    I do have translucent widget (setAttribute( Qt::WA_TranslucentBackground, true);) with is top level widget and stays on top. Widget is transparent and everything do works (at least on Win) fine.

    But there is one problem, I want to paint on that widget by mouse, so I do overrider mousePress/Move/Release but unfortunately, because widget is transparent, mouse events are not received by that widget.

    Question: is there a clean way to force Qt to grab mouse inputs for that widget regardless of it's transparency, so if I do click on that transparent widget I will receive events for that widget (grabMouse don't work, tried that already).

    Thanks for any suggestions.

    UPDATE: Under that widget is just OS apps/background whatever this widget is covering and not another Qt widget.

    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