次のウィジェットがあります。
pixmap = QtGui.QPixmap(r'pics\cdaudio.png').scaled(100, 100)
画像は 256x256 から縮小されています。それはかなり途切れ途切れに見えます:
Qt内からスムーズにスケーリングするにはどうすればよいですか?
パラメータを使用しtransformMode
ます:
pixmap = QtGui.QPixmap(r'pics\cdaudio.png').scaled(100, 100, transformMode=QtCore.Qt.SmoothTransformation)
@iTayb によると、私が思いついたのは次のとおりです。
// Scale the source to the requested size with
// the KeepAspectRatio as aspectMode & SmoothTransformation as mode
*source = source->scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation);
target->setPixmap(*source);
可能であれば、SVG形式(およびこのためのQt SVGモジュール)を使用しないのはなぜですか?