Hello
I have created a circle, like this example in http://doc.trolltech.com/4.7/graphic...sticnodes.html.
Now, I want to insert number inside the circle, as:
How can add number inside the circle ??
Thank you
Hello
I have created a circle, like this example in http://doc.trolltech.com/4.7/graphic...sticnodes.html.
Now, I want to insert number inside the circle, as:
How can add number inside the circle ??
Thank you
Last edited by Jeneo W.; 4th December 2010 at 20:35.
Congratulations. Was there a question?
QPainter::drawText() in the Node::paint() method would be a good starting point.
Last edited by ChrisW67; 4th December 2010 at 20:49.
Is there a way to minimize the size of the font in the QPainter::drawText() ??
Thank![]()
a good way is to use the same QRect or QRectF to draw the circle
and to draw the textQt Code:
To copy to clipboard, switch view to plain text mode
Qt Code:
To copy to clipboard, switch view to plain text mode
To change font's size, use QFont::setPointSize() or QFont::setPointSizeF()
Bookmarks