Symbian^3 and QPainter.rotate()
-
Hi All
I'm using Qt 4.7, and got a strange behaviour of QPainter.rotate function on Symbian^3 (Nokia N8, C7-00, etc). In my program I use QGraphicsView, QGraphicsScene and a subclass of QGraphicsPixmapItem, in which I define a QString field, and redefine the paint method as follows:
@
void Sticker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
QGraphicsPixmapItem::paint(painter, option, widget); // let Qt draw pixmap
//Drawing black text rotated 15 degrees with bold Tahoma font:
painter->rotate(15); // rotate 15 degrees
painter->setFont(QFont("Tahoma", 6, 1, true)); // set font
painter->setPen(QColor("black")); // set color
painter->drawText(10, 10, 100, 100, Qt::TextWordWrap, aText); // and draw text
}
@On Symbian S50 (tested on Nokia 5800) I get a good rotated text painted withing specified rotated rectangle over my pixmap item. But on Symbian^3 I get a not rotated text started at point(0,0) withing a rotated rectangle. How to handle such obstacle?
Thanks ahead
-
Hope that it gets fixed in the final release of Qt 4.7. Since the current release is in beta, you can also raise a bug for this case.
-
Could you test if it still happens if you launch your app with start parameter "-graphicssystem raster"
(or set the graphics system with QApplication::setGraphicsSystem ( const QString & system ))?
If it doesn't happen now, then the issue is with the openVg. Please report the finding to http://bugreports.qt.nokia.com. -
The issue does point towards OpenVG (since that's the major difference with Qt on S^3), however opening a QPainter on a QPixmap will still use the raster paint engine so it should look the exact same as S60 5.0. It would be interesting to see if this happens even without QGraphicsView.
In any case, this sounds like a bug that needs investigating so please submit a report with a minimal test case.
-
I had submitted this on bug-tracker.