pythonqtqt4pyqt

how to change the color of a QGraphicsTextItem


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


Solution

  • 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.