QT - 保存较低分辨率的QPixmap

时间:2015-07-24 08:11:35

标签: qt qpixmap

我希望降低Qpixmap裁剪的分辨率,然后保存一个png

self.view.alpha = 0.2

1 个答案:

答案 0 :(得分:1)

尝试在调用DECLARE @ID1 int DECLARE @ID2 int -- This works INSERT INTO table1 (field1,field2) VALUES('test', 1) SELECT @ID1 = SCOPE_IDENTITY() -- This picks up the correct ID -- This sometimes doesn't seem to run IF @@error <> 0 BEGIN PRINT 'Error before: ' + (cast @@error as varchar) END BEGIN TRY INSERT INTO table2 (field1, field2, field3, field4, field5) VALUES(1,2,3,4,@ID1) END TRY BEGIN CATCH SELECT ERROR_NUMBER() AS ErrorNumber ,ERROR_SEVERITY() AS ErrorSeverity ,ERROR_STATE() AS ErrorState ,ERROR_PROCEDURE() AS ErrorProcedure ,ERROR_LINE() AS ErrorLine ,ERROR_MESSAGE() AS ErrorMessage; END CATCH IF @@error <> 0 BEGIN PRINT 'Error after: ' + cast(@@error as varchar) END -- This always runs, but if the previous insert doesn't run inserts the previous ID into @ID2 SELECT @ID2 = SCOPE_IDENTITY() -- Inserts the ID from the previous step and therefore is sometimes wrong INSERT INTO table3 (field1,field2) VALUES ('testing', @ID2)

中使用quality参数

您可以参考this QT documentation