void Setting_TabProduct::changeImageSize(int width,int height,QString imgFile) { QPixmap pixmap(imgFile); if(width==pixmap.width()&&height==pixmap.height()){ }else{ QPixmap img=pixmap.scaled(width,height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); img.save(imgFile); } }