drawText with QPainter
-
wrote on 23 Jun 2017, 08:51 last edited by
Hello!
I am using a QPainter to draw text and images in a QPrintPreviewDialog. I have a problem with the text, because when it is very long, it leaves the paper. Someone knows how to set the line breaks automatically?
Thank you very much!
-
wrote on 23 Jun 2017, 09:16 last edited by
QTextOption options; options.setWrapMode(QTextOption::WordWrap); painter->drawText(rect,text,options);
-
QTextOption options; options.setWrapMode(QTextOption::WordWrap); painter->drawText(rect,text,options);
1/3