[PyKDE] setting QLabel/QFont text color
Aljosa Mohorovic
aljosa at revolucija.hr
Wed Jul 19 16:13:44 BST 2006
ui.copyPreview is a QLabel and with this code i can set font and text
for QLabel but i need a tip how to set text color. i'm using Qt4
v.4.1.4 / PyQt v.4.0.1 / Python 2.4.2
code:
>>>
f = QFont(self.font_family)
f.setPixelSize(self.font_size)
ui.copyPreview.setText(self.text)
ui.copyPreview.setFont(f)
<<<
i'm looking for something like ui.copyPreview.setColor(QColor)
Aljosa Mohorovic
More information about the PyQt
mailing list