Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Description
About grabToImage:
https://doc.qt.io/qt-6/qml-qtquick-item.html#grabToImage-method
It is said that "Use targetSize to specify the size of the target image. By default, the result will have the same size as the item", but it is not necessarily true. On Retina display, like on MacBook, the result size is well 2x the targetSize/item size.
I know it is because of high DPI and device pixel ratio calculations. But maybe we'd better document it. One step further, let user explicitly choose to grab either logical or actual pixel size.
A simple little sample is attached. grabToImage is told to grab a 400x300 image and the result is 800x600