Add Qt::AA_UseHighDpiPixmaps.
Setting this attribute enables QIcon::pixmap() to return high-dpi pixmaps when running on "retina" type displays. This requires an opt-in flag since the returned pixmap can be larger than the requested size, which is a change in previous documented behaviour that can break existing code. Change-Id: I5ff3d25c68de24aa4eda7ad1f8aa9199da04707e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
b11317a643
commit
b74ba4e198
@ -498,6 +498,7 @@ public:
|
|||||||
AA_X11InitThreads = 10,
|
AA_X11InitThreads = 10,
|
||||||
AA_SynthesizeTouchForUnhandledMouseEvents = 11,
|
AA_SynthesizeTouchForUnhandledMouseEvents = 11,
|
||||||
AA_SynthesizeMouseForUnhandledTouchEvents = 12,
|
AA_SynthesizeMouseForUnhandledTouchEvents = 12,
|
||||||
|
AA_UseHighDpiPixmaps = 13,
|
||||||
|
|
||||||
// Add new attributes before this line
|
// Add new attributes before this line
|
||||||
AA_AttributeCount
|
AA_AttributeCount
|
||||||
|
@ -167,6 +167,14 @@
|
|||||||
to left button mouse events instead. This attribute is enabled
|
to left button mouse events instead. This attribute is enabled
|
||||||
by default.
|
by default.
|
||||||
|
|
||||||
|
\value AA_UseHighDpiPixmaps Make QIcon::pixmap() generate high-dpi pixmaps
|
||||||
|
that can be larger than the requested size. Such pixmaps will have
|
||||||
|
devicePixelRatio set to a value higher than 1.
|
||||||
|
|
||||||
|
After setting this attribute application code that uses pixmap
|
||||||
|
sizes in layout geometry calculations should typically divide by
|
||||||
|
QPixmap::devicePixelRatio() to get device-independent layout geometry.
|
||||||
|
|
||||||
\omitvalue AA_AttributeCount
|
\omitvalue AA_AttributeCount
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user