Antialiasing works on simulator, not on N9
-
I am developing an app with Qt Creator for Nokia N9. Cause I need to draw things, I use class inherited from QWidget and on paintEvent I use QPainter to draw a line (drawLine(0,0,480,854))
It works, but line is aliased on my device, and antialiased on simulator.
I seems, that setRenderHints does not work at all and have no effect.
@painter.setRenderHint(RenderHint.Antialiasing, true);@
The text is aliased (drawText), but line is not. If I do:@painter.setRenderHint(RenderHint.TextAntialiasing, false);@
Text is still aliased on N9 and not aliased in simulator. I'm stuck. -
AFAIK the N9 UI is running using OpenGL. Try using QPainter::HighQualityAntialiasing.
-
Checked -- doesn't work :-(
The app is really simple.
@
Q_DECL_EXPORT int main(int argc, char argv[])
{
QApplication app = createApplication(argc, argv);
Board* board = new Board();
board->showFullScreen();
app->installEventFilter(Board::instance);
return app->exec();
}void Board::paintEvent(QPaintEvent *)
{
QPainter painter(this);
QPen pen;
painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
pen.setWidth(3);
painter.setPen(pen);
painter.drawEllipse(.....);
}
@I so much need help!