QStyleOptionMenuItemV2 Class

The QStyleOptionMenuItemV2 class enhances QStyleOptionMenuItem with new members. More...

Header: #include <QStyleOptionMenuItemV2>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
Inherits: QStyleOptionMenuItem

Public Functions

QStyleOptionMenuItemV2()
QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other)

Public Variables

bool mouseDown

Detailed Description

Member Function Documentation

QStyleOptionMenuItemV2::QStyleOptionMenuItemV2()

Constructs a QStyleOptionMenuItemV2, initializing the members variables to their default values.

QStyleOptionMenuItemV2::QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other)

Constructs a copy of the other style option.

Member Variable Documentation

bool QStyleOptionMenuItemV2::mouseDown

true when the mouse is pressed down.

This is needed because there is no differentation between a pressed and a sunken state when QStyle::State_Sunken is set. QStyle::State_Sunken is also set when the menu is open (i.e. showing the popup menu)

© 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.