[Qt-interest] QWIDGETSIZE_MAX and widget geometry limits

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Tue Jul 6 10:08:17 CEST 2010


Hi,

can I safely assume that any widget lies within in the coordinate space:

-QWIDGETSIZE_MAX .. QWIDGETSIZE_MAX , -QWIDGETSIZE_MAX .. QWIDGETSIZE_MAX

or more specifically: I want to create a 'capture all' overlay that will
trap all the mouse events, so is enough to create a QWidget with geometry:

(-QWIDGETSIZE_MAX , -QWIDGETSIZE_MAX, 2*QWIDGETSIZE_MAX , 2*QWIDGETSIZE_MAX)

I understand that logically this is wrong (using 2*QWIDGETSIZE_MAX) but
seeing that QWIDGETSIZE_MAX sort of tries to define the coordinate size
this would seem to be likely to work.

Note that I'm not creating the overlay just to capture events, I also
want to use it to 'dim' or perhaps blur the widgets behind it.

Or is there a betterway?

This in the context embedded Linux but I need to be able to use
this on desktop too.

br Kusti






More information about the Qt-interest-old mailing list