I want to change the font color of a text in an UI, but it's seems that there is nothing in the text command doc to do this. It's possible to change the background color, but nothing about the font itself.
I searched around the internet and found this code to change a button text color using PyQt (source).
import maya.OpenMayaUI as omUI
from PyQt4 import QtGui
import sip
bt = sip.wrapinstance(long(omUI.MQtUtil.findControl(_the_button_name_)), QtGui.QPushButton)
bt.setStyleSheet('QPushButton {color: yellow}')
So, I have two questions:
First, what should I use, instead of QPushButton
, to edit the color of a text control, and two, the button color here is changed to 'yellow'
and I'd like to change it to a custom color value, is there a way to also do this?
Thanks in advance!