- Qt 6.11
- Qt Widgets
- C++ Classes
- QStyleOptionMenuItemV2
- Qt 6.11.0 Reference Documentation

# 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

- List of all members, including inherited members

## 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)