hi,
i've got a problem with a Qstring i want to print. the string is very long an contains a table made with <tr>, <th>, <br> and so on.
Printing it with the following configuration leads to a result, in which only one line exists and ends at the end of the page. The tags like <br> are idnored -simply printed-, too.
Code:
void THIS::printQString() { Q_ASSERT(xLabel->text()); if (dialog.exec()) { painter.setPen( Qt::black ); painter.setFont(font); painter.drawText(10, 10,xLabel->text()); } }
xLabel->setText(COMPLEXTEXT); does exactely what i want but painter.drawText(10, 10,xLabel->text()); doesn't format the QString in the same way. I want the printing result look exactely the same way as the QLabel xLabel (it fits on a page for sure).
How can this be done?