PDA

View Full Version : How to put text labels on a figure



tommy
7th May 2009, 15:52
My program plots numerical data and makes figures. I´m currently using QPixmap to make figures. Now I´d like to label some very specific locations of the figure with text (preferably vertical text). How could I do that? I have a feeling that QPixmap may not be the best format for this. But if I wanted to use QPixmap, how could I do it?
Thanks!

mcosta
7th May 2009, 16:38
You can use QPainter with QPixmap as Device

tommy
7th May 2009, 17:26
Yes, I know QPainter but how do I write and orient text with it?

wysota
7th May 2009, 17:33
Use QPainter::rotate and QPainter::translate and of course QPainter::drawText.