Solution
Hi,
I solved the problem on my own. For those of you who are interested:
instead of trying to configure the painter in my custom item class,
I just call before my operation
MyItem::mousePressEvent(...){
this
->scene
()->views
().
first()->setRenderHint
(QPainter::SmoothPixmapTransform,
false);
}
MyItem::mousePressEvent(...){
this->scene()->views().first()->setRenderHint(QPainter::SmoothPixmapTransform, false);
}
To copy to clipboard, switch view to plain text mode
and after it
MyItem::mouseReleaseEvent(...){
this
->scene
()->views
().
first()->setRenderHint
(QPainter::SmoothPixmapTransform,
true);
}
MyItem::mouseReleaseEvent(...){
this->scene()->views().first()->setRenderHint(QPainter::SmoothPixmapTransform, true);
}
To copy to clipboard, switch view to plain text mode
And it works!
Nice!
I really start liking Qt!
Regards,
Olli
Bookmarks