How to display QGraphicsTextItem vertically in Qt?
-
I have a QGraphicsView with various logic gates. Every logic gate have pins and pins have names. To display pin names, I have used class which is derived from QGraphicsTextItem.
In 1st diagram, we can see pin names as E, GND and SRC. As all the pins location are very near to each other, so I tried to display them vertically.
In 2nd diagram, with the help of setRotation(-90) from QraphicsTextItem. I rotated them anticlocke wise.
In 3rd diagram, I just changed their x and y location.
Now we can see that, final pin name E's location is far from it's pin. But GND and SRC are properly placed near to their pin location.
If I changed E's y co-ordinates, then other pins y location also changes ( which I do not want)So can I adjust pin name E near to it's pin location without changing other pins x and y locations ?