[PyKDE] setting QLabel/QFont text color
Andreas Pakulat
apaku at gmx.de
Wed Jul 19 16:33:32 BST 2006
On 19.07.06 17:13:44, Aljosa Mohorovic wrote:
> 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
>
> i'm looking for something like ui.copyPreview.setColor(QColor)
No you're not ;-) Look at palette() and setPalette() of the QWidget
class. It contains a role for WindowText which probably is what you're
looking for (see ColorRole enum for more roles).
Andreas
--
Advancement in position.
More information about the PyQt
mailing list