QGraphicsRectItem with text
Hi!
I'm very new at Qt and I need to be able to write text in a QGraphicsRectItem. I tried making a class inheriting from QGraphicsRectItem and QGraphicsTextItem and then use setPlainText but the text won't show up. What do I have to do and how?
I'm using Python.
Thank you very much!
Re: QGraphicsRectItem with text
Re: QGraphicsRectItem with text
Thank you :)
New question: how can I manage to display the text (which will just be a number) in the center of the QGraphicsRectItem? I can't seem to find any alignment method in the QGraphicsTextItem class.
Thank you again!