Trapping mouse events on an overlay

I could have sworn I saw a flag for trapping mouse clicks on groupbox overlays but now can’t find it.

In my use case I have a hidden groupbox that when activated overlays the interface to display credits and helpful tips, but if I click on the overlay I can trigger widgets underneath. Any easy way to prevent these clicks from passing through?

Thanks!

M1 Pro MBP 32/1T Tahoe 26.2 / Cabbage 2.10.0

I’ve tried adding mouseInteraction(1) to the overlay groupbox but that doesn’t appear to do anything.

I’m noticing the SVG I also display on the overlay does block mouse actions, so I guess I could make it cover the bounds of the groupbox.

Groupboxes can’t consume mouse clicks, but an image can. So either place an image into your groupbox, or simply use an image instead :+1:

1 Like