이 페이지에서

QStyleOptionMenuItemV2 Class

QStyleOptionMenuItemV2 클래스는 QStyleOptionMenuItem 에 새로운 멤버를 추가하여 기능을 확장합니다. 더 보기...

헤더: #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)
QStyleOptionMenuItemV2 &operator=(const QStyleOptionMenuItemV2 &)

공개 변수

bool mouseDown

상세 설명

멤버 함수 문서

QStyleOptionMenuItemV2::QStyleOptionMenuItemV2()

QStyleOptionMenuItemV2 객체를 생성하고, 멤버 변수들을 기본값으로 초기화합니다.

QStyleOptionMenuItemV2::QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other)

other 스타일 옵션의 복사본을 생성합니다.

[noexcept default] QStyleOptionMenuItemV2 &QStyleOptionMenuItemV2::operator=(const QStyleOptionMenuItemV2 &)

other 를 이 QStyleOptionMenuItemV2 인스턴스에 복사 할당합니다.

멤버 변수 문서

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.