PDA

View Full Version : QGraphicsView draw grids and Graduation texts.



fkili
19th July 2012, 12:27
hi all.

I seek to draw grids and graduation indicators in a QGraphicsView. :rolleyes:

grids are horizontal and vertical lines
graduations are text

I have derived from QGraphicsView class and I overloaded the method DrawForeground. I use QPainter to draw lines and text.

it works well, but the text illegible and are small scale and are convertible to each operation of zoom (scale (a, b​​)).

* there is a solution to write a text with fixed size in QGraphicsView? :confused:

thank to all :) .

wysota
20th July 2012, 11:50
Yes, you can invert the view transform or you can make your text pieces as items and then set ItemIgnoresTransformations on them.