2024-09-30 00:33:33 发布
网友
我有以下小部件:
pixmap = QtGui.QPixmap(r'pics\cdaudio.png').scaled(100, 100)
图像从256x256缩小。它看起来很起伏:
如何从Qt内平滑地缩放它
根据@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模块)
根据@iTayb,我想到了以下几点:
如果可能,为什么不使用SVG格式(以及Qt SVG模块)
相关问题 更多 >
编程相关推荐