[Qt-interest] Problem: X Error: BadWindow (invalid Window parameter) 3 ...

Bjoern Erik Nilsen bnilsen at trolltech.com
Wed Feb 4 15:03:55 CET 2009


> The algorithm can easily be improved further, but I will leave that as 
> an exercise for the reader :-)

Just come to think of it, this approach won't work as expected when 
having mouse grabbers (grabMouse() or press-and-hold on a mouse button). 
In that case the Qt::WA_UnderMouse is updated slightly different. The 
attribute is basically updated whenever the widget gets enter/leave events.

If you are in doubt whether you can use it or not, I suggest you stick 
with widgetAt()/topLevelAt() to make sure your application continues to 
work as intended.

Anyways, I'm not able to trigger any X errors using 
widgetAt()/topLevelAt(), so your application is very much appreciated in 
my inbox :-)

-- 
Bjørn Erik Nilsen
Software Engineer
Nokia, Qt Software



More information about the Qt-interest-old mailing list