Use QPainter. Here's an example from the docs:
Replace QPainter::drawText() with QPainter::drawRect()..Qt Code:
void SimpleExampleWidget::paintEvent() { paint.setPen( Qt::blue ); paint.drawText( rect(), AlignCenter, "The Text" ); }To copy to clipboard, switch view to plain text mode
Bookmarks