QIconEngine::ScaledPixmapArgument Struct
struct QIconEngine::ScaledPixmapArgument公共变量
详细说明
当id 参数为QIconEngine::ScaledPixmapHook 时,该结构体代表virtual_hook() 函数的参数。
该结构提供了一种方法,使通过QIcon::fromTheme() 创建的图标能够返回根据当前设备像素比例设计的像素图。这种图标的比例是通过相应index.theme
文件中的比例目录键指定的。
通过其他方法创建的图标将返回与调用pixmap() 相同的结果,并继续受益于 Qt XML 的"@nx" high DPI syntax 。
另请参阅 virtual_hook(),QIconEngine::IconEngineHook, 和High DPI Icons 。
成员变量文档
QIcon::Mode ScaledPixmapArgument::mode
该变量用于保存像素图的请求模式。
另请参阅 QIcon::Mode 。
QPixmap ScaledPixmapArgument::pixmap
此变量保存与给定的size,mode,state, 和scale 最匹配的像素图。这是调用virtual_hook() 后设置的输出参数。
qreal ScaledPixmapArgument::scale
该变量用于保存像素图的缩放比例。
QSize ScaledPixmapArgument::size
该变量用于保存所请求的像素图大小。
QIcon::State ScaledPixmapArgument::state
此变量保存像素图的请求状态。
另请参阅 QIcon::State 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.