Ah, that lead to the solution, since draw doesn't accept subpixel either, I scaled up the png to 10*size, then I created a 10*larger image and pasted the huge image there, then I rescaled the image to 1/10. Thanks a lot!
Btw., I use the label as a marker, that's why I need subpixel precision.
p.
setRenderHint(QPainter::Antialiasing);
//for A
image.fill(0);
p.begin(&image);
shift.setX((Ax-floor(Ax))*10);
shift.setY((Ay-floor(Ay))*10);
p.drawPixmap(shift,pixmap);
p.end();
pixmap
= QPixmap::fromImage(image.
scaledToWidth(10,Qt
::SmoothTransformation),Qt
::AutoColor);
ui->label_5->setPixmap(pixmap);
QPixmap pixmap("CrossI.png");
QImage image(100,100,QImage::Format_ARGB32_Premultiplied);
QPainter p;
p.setRenderHint(QPainter::Antialiasing);
QPoint shift;
//for A
image.fill(0);
p.begin(&image);
shift.setX((Ax-floor(Ax))*10);
shift.setY((Ay-floor(Ay))*10);
p.drawPixmap(shift,pixmap);
p.end();
pixmap = QPixmap::fromImage(image.scaledToWidth(10,Qt::SmoothTransformation),Qt::AutoColor);
ui->label_5->setPixmap(pixmap);
To copy to clipboard, switch view to plain text mode
Bookmarks