and setting a stylesheet doesn’t transform it into a QPalette that you can
then access values of.​

Sure it does. :)

Here’s an example of sampling the QPalette of a QWindow, setting a
stylesheet, and then sampling again.
https://gist.github.com/mottosso/9f27229fa75815bf4969

The stylesheet is:

QWidget {
    background-color: "blue"}

And the corresponding changes to the QPalette are:

Changed (Window) #444444 = #0000ff
Changed (Base) #2a2a2a = #0000ff
Changed (Background) #444444 = #0000ff
Changed (Button) #646464 = #0000ff

Basically, from various levels of gray (Maya default) to blue, where the
parentheses name is the Role taken from QtGui.QPalette.
​

-- 
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/CAFRtmOAZ9jA89WvEuX7HjVRyZzsWPWA2jH1z7LOkQ2%2BLkF8qUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to