How to get the application font color in Qt

Posted by Solitaire on Stack Overflow See other posts from Stack Overflow or by Solitaire
Published on 2010-04-28T11:42:18Z Indexed on 2010/04/28 12:03 UTC
Read the original article Hit count: 405

Filed under:
|
|
|
|

Hi,

I want to put some text on my UI, I am drawing the text in paint event of a widget using painter..

Here is the sample code, which shows how I am drawing the text..

QWidget::paintEvent(painter);
QPainter paint(this);
paint.drawText(QPoint(10,30),"Duplex");

but, the text color is looks like the default theme color, how to set the application font color to the text in paint event..

Thanks

© Stack Overflow or respective owner

Related posts about qt

Related posts about qt4