QStyleOptionMenuItemV2 Class
QStyleOptionMenuItemV2 类通过新成员增强了QStyleOptionMenuItem 。更多
| Header: | #include <QStyleOptionMenuItemV2> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets)target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| 自 | Qt 6.11 |
| 继承: | QStyleOptionMenuItem |
公共函数
| QStyleOptionMenuItemV2() | |
| QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other) |
公共变量
| bool | mouseDown |
成员函数文档
QStyleOptionMenuItemV2::QStyleOptionMenuItemV2()
构造 QStyleOptionMenuItemV2,将成员变量初始化为默认值。
QStyleOptionMenuItemV2::QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other)
构建other 样式选项的副本。
成员变量文档
bool QStyleOptionMenuItemV2::mouseDown
当鼠标按下时为 true。
QStyle::State_Sunken QStyle::State_Sunken 也会在菜单打开时设置(即显示弹出菜单)。
© 2026 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.