QStyleOptionFocusRect Class
QStyleOptionFocusRect 类用于描述使用QStyle 绘制焦点矩形的参数。更多
头文件: | #include <QStyleOptionFocusRect> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
继承: | QStyleOption |
公共类型
enum | StyleOptionType { Type } |
enum | StyleOptionVersion { Version } |
公共函数
QStyleOptionFocusRect() | |
QStyleOptionFocusRect(const QStyleOptionFocusRect &other) |
公共变量
QColor | backgroundColor |
另请参见 QStyleOption 。
成员类型文档
enum QStyleOptionFocusRect::StyleOptionType
该枚举用于保存有关样式选项类型的信息,并为每个QStyleOption 子类定义。
常量 | 值 | 描述 |
---|---|---|
QStyleOptionFocusRect::Type | SO_FocusRect | 提供的样式选项的类型(SO_FocusRect 适用于该类)。 |
QStyleOption 及其子类和qstyleoption_cast() 内部使用该类型来确定样式选项的类型。一般来说,除非您想创建自己的QStyleOption 子类和自己的样式,否则不需要担心这个问题。
另请参见 StyleOptionVersion 。
enum QStyleOptionFocusRect::StyleOptionVersion
该枚举用于保存有关样式选项版本的信息,并为每个QStyleOption 子类定义。
常量 | 值 | 说明 |
---|---|---|
QStyleOptionFocusRect::Version | 1 | 1 |
版本用于QStyleOption 子类在不破坏兼容性的情况下实现扩展。如果使用qstyleoption_cast() ,通常不需要检查它。
另请参阅 StyleOptionType 。
成员函数文档
QStyleOptionFocusRect::QStyleOptionFocusRect()
构造一个 QStyleOptionFocusRect,将成员变量初始化为默认值。
QStyleOptionFocusRect::QStyleOptionFocusRect(const QStyleOptionFocusRect &other)
构建other 样式选项的副本。
成员变量文档
QColor QStyleOptionFocusRect::backgroundColor
该变量用于保存绘制焦点矩形的背景颜色。
默认值是 RGB 值为 (0, 0, 0) 的无效颜色。无效颜色是指底层窗口系统未正确设置的颜色。
© 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.