Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change the color of a QGraphicsTextItem

Tags:

python

qt

qt4

pyqt

i have a scene with a multiple (QGraphicsTextItem)s, and i need to have control over their colors , so how to change a color of a QGraphicsTextItem ? is it possible anyway? i've been trying for 3 days until now . please help


thanks in advance

like image 896
Moayyad Yaghi Avatar asked Jul 31 '10 08:07

Moayyad Yaghi


1 Answers

I think you can change the text color by calling the method:

void QGraphicsTextItem::setDefaultTextColor ( const QColor & col );

You have an example here.

Or looking for Diagram Scene Example in your Qt Assistant.

like image 60
bruno Avatar answered Sep 20 '22 19:09

bruno