QTextDocument doc(text);
doc.setDefaultFont(painter->font());
painter->save();
doc.adjustSize();
doc.setPageSize(QSize(r.width(), doc.size().height()));
painter->translate(r.x(), r.y() + (r.height() - doc.size().height()) / 2);
doc.drawContents(painter);
painter->restore();
how to drawText for arabic like qlabel
最新推荐文章于 2024-01-08 23:01:58 发布