Is there a way to set the DPI of a QPicture
?
有没有办法设置QPicture的DPI?
1 个解决方案
#1
I don't think so. At least, not in a convenient way. The only approach I can think of is to scale the QPainter used to create the QPicture. If you are painting the picture using QPainter operations, as opposed to just setting it on a QLabel, you could possibly scale that QPainter instead.
我不这么认为。至少,不是方便的方式。我能想到的唯一方法是缩放用于创建QPicture的QPainter。如果您使用QPainter操作绘制图片,而不是仅在QLabel上设置它,则可以缩放该QPainter。
#1
I don't think so. At least, not in a convenient way. The only approach I can think of is to scale the QPainter used to create the QPicture. If you are painting the picture using QPainter operations, as opposed to just setting it on a QLabel, you could possibly scale that QPainter instead.
我不这么认为。至少,不是方便的方式。我能想到的唯一方法是缩放用于创建QPicture的QPainter。如果您使用QPainter操作绘制图片,而不是仅在QLabel上设置它,则可以缩放该QPainter。