Unrelated to the problem at hand, but related to eventFilter, I did already
find a good use for them.

When sizing things via CSS, widgets aren't resized immediately but are
delayed towards the point where the widget is about to be shown. So asking
a widget for it's size when running the application would yield incorrect
results.

The way I dealt with it previously was to run QWidget.ensurePolished(), but
that only worked on a per-widget occasion, meaning I'd have to cascade the
call to each child widget for accurate results.

Now, instead of calling upon the method querying the sizes directly, I
posted an event, picked up in an eventFilter during QEvent.Show and fired a
call from there to the method making the queries, and the sizes are correct.

I've been missing out. :)

Thanks for the tip Justin, I've had such a hard time with this particular
issue for a long time.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB1oMtPyRAbcWSUb-PJ0TGwHDZ%2BpJPMoDvaNZTdqXDf-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to