QPixmap::scaled(const QSize & size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation) const
根據給定的尺寸來放大縮小QPixmap
IgnoreAspectRatio 矩形框有多大,圖片就縮放成多大,不限制原圖片的長寬比
KeepAspectRatio 保持原圖片的長寬比,且不超過矩形框的大小
KeepAspectRatioByExpanding 根據矩形框的大小最大縮放圖片
QPixmap::scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation) const
返回匹配目標設置後的QPixmap,寬高爲給定值