QStyleOptionButton Class
QStyleOptionButton 클래스는 버튼을 그리기 위한 매개 변수를 설명하는 데 사용됩니다. 더 보기...
Header: | #include <QStyleOptionButton> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
상속합니다: | QStyleOption |
공용 타입
enum | ButtonFeature { None, Flat, HasMenu, DefaultButton, AutoDefaultButton, CommandLinkButton } |
flags | ButtonFeatures |
enum | StyleOptionType { Type } |
enum | StyleOptionVersion { Version } |
공용 함수
QStyleOptionButton() | |
QStyleOptionButton(const QStyleOptionButton &other) |
공용 변수
상세 설명
QStyleOptionButton에는 QStyle 함수가 QPushButton, QCheckBox, QRadioButton 와 같은 그래픽 요소를 그리는 데 필요한 모든 정보가 포함되어 있습니다.
성능상의 이유로 멤버 함수는 거의 없으며 멤버 변수에 대한 액세스는 직접적으로(즉, .
또는 ->
연산자 사용) 이루어집니다. 이렇게 하면 구조가 사용하기 쉽고 스타일 함수에 사용되는 매개변수라는 점을 강조할 수 있습니다.
QStyleOption 및 QStyleOptionToolButton 을참조하세요 .
멤버 유형 문서
열거형 Q스타일옵션버튼::버튼기능
플래그 Q스타일옵션버튼::버튼기능
이 열거형은 푸시 버튼이 가질 수 있는 다양한 유형의 기능을 설명합니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionButton::None | 0x00 | 일반 푸시 버튼을 나타냅니다. |
QStyleOptionButton::Flat | 0x01 | 평면 푸시 버튼을 나타냅니다. |
QStyleOptionButton::HasMenu | 0x02 | 버튼에 드롭다운 메뉴가 있음을 나타냅니다. |
QStyleOptionButton::DefaultButton | 0x04 | 버튼이 기본 버튼임을 나타냅니다. |
QStyleOptionButton::AutoDefaultButton | 0x08 | 버튼이 자동 기본 버튼임을 나타냅니다. |
QStyleOptionButton::CommandLinkButton | 0x10 | 버튼이 Windows Vista 유형 명령 링크임을 나타냅니다. |
ButtonFeatures 유형은 QFlags<ButtonFeature>에 대한 typedef입니다. ButtonFeature 값의 OR 조합을 저장합니다.
features 를참조하세요 .
enum QStyleOptionButton::StyleOptionType
이 열거형은 스타일 옵션의 유형에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 하위 클래스마다 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionButton::Type | SO_Button | 제공되는 스타일 옵션의 유형입니다(이 클래스의 경우SO_Button ). |
이 유형은 QStyleOption, 그 하위 클래스 및 qstyleoption_cast()에서 스타일 옵션의 유형을 결정하기 위해 내부적으로 사용됩니다. 일반적으로 자체 QStyleOption 하위 클래스와 자체 스타일을 만들려는 경우가 아니라면 이에 대해 걱정할 필요가 없습니다.
StyleOptionVersion 를참조하세요 .
enum QStyleOptionButton::StyleOptionVersion
이 열거형은 스타일 옵션의 버전에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 서브클래스에 대해 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionButton::Version | 1 | 1 |
이 버전은 QStyleOption 하위 클래스에서 호환성을 깨지 않고 확장을 구현하는 데 사용됩니다. qstyleoption_cast ()를 사용하는 경우 일반적으로 확인할 필요가 없습니다.
StyleOptionType 를참조하세요 .
멤버 함수 문서
QStyleOptionButton::QStyleOptionButton()
멤버 변수를 기본값으로 초기화하여 QStyleOptionButton을 생성합니다.
QStyleOptionButton::QStyleOptionButton(const QStyleOptionButton &other)
other 스타일 옵션의 복사본을 생성합니다.
멤버 변수 문서
QStyleOptionButton::ButtonFeatures QStyleOptionButton::features
이 변수는 이 버튼을 설명하는 기능의 비트 단위 OR을 보유합니다.
ButtonFeature 를참조하세요 .
QIcon QStyleOptionButton::icon
이 변수는 버튼의 아이콘을 저장합니다.
기본값은 빈 아이콘, 즉 픽셀맵도 파일 이름도 없는 아이콘입니다.
iconSize 를참조하세요 .
QSize QStyleOptionButton::iconSize
이 변수는 버튼의 아이콘 크기를 저장합니다.
기본값은 QSize(-1, -1), 즉 잘못된 크기입니다.
QString QStyleOptionButton::text
이 변수에는 버튼의 텍스트가 저장됩니다.
기본값은 빈 문자열입니다.
© 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.