按钮三态图

2019-04-15 13:36发布

   Btn_Min->setStyleSheet("QPushButton{border-image: url(:/new/prefix2/Pic/JPG/minback.png)0 60 0 0;}" "QPushButton:hover{border-image: url(:/new/prefix2/Pic/JPG/minback.png)0 30 0 30;}" "QPushButton:pressed{border-image: url(:/new/prefix2/Pic/JPG/minback.pngp)0 0 0 60;}"); 裁剪图片 QImage image("C:/Users/Mactarvish/Desktop/myPicture_v1.png"); QImage newImage = image.copy(90, 90, image.width()-90, image.height()-90); qDebug() << newImage.save("C:/Users/Mactarvish/Desktop/CropedImage.png");