Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.2.1
-
None
-
iOS (iPhone4), OSX Mavericks
Description
When trying to draw text using QPainter, it will hang on that call for a few seconds (5 seconds on iPhone4 and around 3 on OSX). After that first time, it won't block anymore if I call it again.
QImage image(QSize(200, 200), QImage::Format_ARGB32_Premultiplied);
image.fill(Qt::transparent);
QPainter painter(&image);
QPen pen(d->textColor);
painter.setPen(pen);
QFont font(d->fontFamily, d->fontSize);
painter.setFont(font);
qDebug() << "Before draw text";
painter.drawText(QRect(0, 0, 200, 200), flags, d->text); //Blocking call
qDebug() << "After draw text";
I use the exact same code under Windows(Qt5.1) and I've never had any problems, it will run smoothly.