On Wed, 11 Mar 2015 6:56 AM Marcus Ottosson <[email protected]> wrote:
To be honest, I’m trying to snatch the complete stylesheet from Maya (if at all possible) to use that look in one of my UIs which runs outside of Maya. The problem is Maya doesn’t have a stylesheet. Qt supports parsing of CSS-like* stylesheets that is then converted into commands similar to what Tony posted. But once they’re converted, the stylesheet you passed is out of the game. That’s why you can’t get the full stylesheet, because even if one were used to initially create the look - which may not be the case at all - it would never have been stored into the application to begin with. You could potentially reverse-engineer part of it by querying the brushes and pens of each QWidget. *CSS-like, as in, not all CSS-features are included. See here for more: http://qt-project.org/doc/qt-4.8/stylesheet.html I am not sure this information is accurate. Stylesheets and QPalette/QStyle are two different things. If you use a stylesheets it takes priority over a palette, and setting a stylesheet doesn't transform it into a QPalette that you can then access values of. That is actually a downside of stylesheets since you cannot introspect the colours and do lighter/darker variations. They are also supposedly a touch slower, albeit the are way more flexible to use. Maya is most likely using a custom QStyle/palette and not stylesheets. -- 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/CAFRtmOCYpx6Z7diabhkosmvXR5NwbOB2bK555P_%3DXyC%3Dqp%2B2XA%40mail.gmail.com <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCYpx6Z7diabhkosmvXR5NwbOB2bK555P_%3DXyC%3Dqp%2B2XA%40mail.gmail.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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/CAPGFgA3jDDGnh75DUvsKAZQ4AFeNZfkeduhsfPNK8%2Bfegr%3DgOA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
