If you wanted to get a perfect match, you could build some functions like this:
from PyQt4 import QtGui
groups = ['Disabled', 'Active', 'Inactive', 'Normal']
roles = ['Window',
'Background',
'WindowText',
'Foreground',
'Base',
'AlternateBase',
'ToolTipBase',
'ToolTipText',
'Text',
'Button',
'ButtonText',
'BrightText']
def getPaletteInfo():
palette = QtGui.QApplication.palette()
#build a dict with all the colors
result = {}
for role in roles:
for group in groups:
qGrp = getattr(QtGui.QPalette, group)
qRl = getattr(QtGui.QPalette, role)
result['%s:%s' % (role, group)] = palette.color(qGrp, qRl).rgba()
return result
def setPaletteFromDct(dct):
palette = QtGui.QPalette()
for role in roles:
for group in groups:
color = QtGui.QColor(dct['%s:%s' % (role, group)])
qGrp = getattr(QtGui.QPalette, group)
qRl = getattr(QtGui.QPalette, role)
palette.setColor(qGrp, qRl, color)
QtGui.QApplication.setPalette(palette)
You could pickle out the dct you get in maya and use the other function to set it in the standalone app
JP
--
John Patrick
404-242-2675jspa...@gmail.comhttp://www.canyourigit.com