QGraphicstextItem is not visible
-
I have many QGraphicsItem inside my QGraphicsScene. Each QGraphicsItem has some text inside it.
QGraphicsItem's are coloured with some color. ( here color is yellow )
But the issue is, when I apply color to QGraphicsItem, text inside it gets hidden.In above rectangle, there is a text inside it but I have applied a pale yellow color to rectangle and because of that, text inside it is getting hidden.
class myRect: public QGraphicsRectItem QRectF Rect( some co-ordinates) myRect* rect = new myRect(Rect); rect->setBrush(QBrush(QColor("#FFFACA")));class myText : public QGraphicsTextItem myText* text = new myText(some text); text->DrawText( some co-ordinates);How to make the inside text visible ?
-
@tushu said in QGraphicstextItem is not visible:
In above rectangle, there is a text inside it but I have applied a pale yellow color to rectangle and because of that, text inside it is getting hidden.
Maybe the Z position of QGraphicstextItem ?