QStyleOptionProgressBar Class
QStyleOptionProgressBar 클래스는 진행률 표시줄을 그리는 데 필요한 매개 변수를 설명하는 데 사용됩니다. 더 보기...
Header: | #include <QStyleOptionProgressBar> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
상속합니다: | QStyleOption |
공용 타입
enum | StyleOptionType { Type } |
enum | StyleOptionVersion { Version } |
공용 함수
QStyleOptionProgressBar() | |
QStyleOptionProgressBar(const QStyleOptionProgressBar &other) |
공용 변수
bool | bottomToTop |
bool | invertedAppearance |
int | maximum |
int | minimum |
int | progress |
QString | text |
Qt::Alignment | textAlignment |
bool | textVisible |
상세 설명
QStyleOptionProgressBar 클래스의 인스턴스에는 SO_ProgressBar 유형과 버전 2가 있습니다.
이 유형은 QStyleOption, 그 하위 클래스 및 qstyleoption_cast()에서 스타일 옵션의 유형을 결정하기 위해 내부적으로 사용됩니다. 일반적으로 자체 QStyleOption 서브클래스와 자체 스타일을 만들려는 경우가 아니라면 이에 대해 걱정할 필요가 없습니다. 이 버전은 호환성을 깨지 않고 확장을 구현하기 위해 QStyleOption 서브클래스에서 사용됩니다. qstyleoption_cast ()를 사용하는 경우 일반적으로 확인할 필요가 없습니다.
성능상의 이유로 멤버 함수가 거의 없으며 멤버 변수에 직접 액세스합니다(예: .
또는 ->
연산자 사용). 이렇게 하면 구조가 사용하기 쉽고 스타일 함수에 사용되는 매개변수라는 점을 강조할 수 있습니다.
QStyleOption 를참조하세요 .
멤버 유형 문서
enum QStyleOptionProgressBar::StyleOptionType
이 열거형은 스타일 옵션의 유형에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 하위 클래스마다 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionProgressBar::Type | SO_ProgressBar | 제공되는 스타일 옵션의 유형입니다(이 클래스의 경우SO_ProgressBar ). |
이 유형은 QStyleOption, 그 하위 클래스 및 qstyleoption_cast()에서 스타일 옵션의 유형을 결정하기 위해 내부적으로 사용됩니다. 일반적으로 자체 QStyleOption 하위 클래스와 자체 스타일을 만들려는 경우가 아니라면 이에 대해 걱정할 필요가 없습니다.
StyleOptionVersion 를참조하세요 .
enum QStyleOptionProgressBar::StyleOptionVersion
이 열거형은 스타일 옵션의 버전에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 서브클래스에 대해 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionProgressBar::Version | 1 | 2 |
이 버전은 QStyleOption 하위 클래스에서 호환성을 깨지 않고 확장을 구현하는 데 사용됩니다. qstyleoption_cast ()를 사용하는 경우 일반적으로 확인할 필요가 없습니다.
StyleOptionType 를참조하세요 .
멤버 함수 문서
QStyleOptionProgressBar::QStyleOptionProgressBar()
멤버 변수를 기본값으로 초기화하여 QStyleOptionProgressBar를 생성합니다.
QStyleOptionProgressBar::QStyleOptionProgressBar(const QStyleOptionProgressBar &other)
other 스타일 옵션의 복사본을 생성합니다.
멤버 변수 문서
bool QStyleOptionProgressBar::bottomToTop
이 변수는 진행률 표시줄이 세로일 때 텍스트가 아래에서 위로 읽히는지 여부를 나타냅니다.
기본값은 false입니다.
QProgressBar::textDirection 를참조하세요 .
bool QStyleOptionProgressBar::invertedAppearance
이 변수는 진행률 표시줄의 모양을 반전시킬지 여부를 저장합니다.
기본값은 false입니다.
QProgressBar::invertedAppearance 를참조하세요 .
int QStyleOptionProgressBar::maximum
이 변수는 진행률 표시줄의 최대값을 보유합니다.
진행률 표시줄의 최대값입니다. 기본값은 0입니다.
QProgressBar::maximum 를참조하세요 .
int QStyleOptionProgressBar::minimum
이 변수는 진행률 표시줄의 최소값을 보유합니다.
진행률 표시줄의 최소값입니다. 기본값은 0입니다.
QProgressBar::minimum 를참조하세요 .
int QStyleOptionProgressBar::progress
이 변수는 진행률 표시줄의 현재 진행률을 저장합니다.
현재 진행률입니다. QStyleOptionProgressBar::minimum - 1 값은 진행률이 아직 시작되지 않았음을 나타냅니다. 기본값은 0입니다.
QProgressBar::value 를참조하세요 .
QString QStyleOptionProgressBar::text
이 변수에는 진행률 표시줄의 텍스트가 저장됩니다.
진행률 표시줄 텍스트는 일반적으로 진행률을 문자열로 표현합니다. 빈 문자열은 진행률 표시줄이 아직 시작되지 않았음을 나타냅니다. 기본값은 빈 문자열입니다.
QProgressBar::text 를참조하세요 .
Qt::Alignment QStyleOptionProgressBar::textAlignment
이 변수는 QProgressBar 에 있는 텍스트의 텍스트 정렬을 유지합니다.
진행률 표시줄에서 텍스트가 어디에 위치해야 하는지에 대한 가이드로 사용할 수 있습니다. 기본값은 Qt::AlignLeft 입니다.
bool QStyleOptionProgressBar::textVisible
이 변수에는 텍스트 표시 여부를 나타내는 플래그가 있습니다.
이 플래그가 참이면 텍스트가 표시됩니다. 그렇지 않으면 텍스트가 표시되지 않습니다. 기본값은 false입니다.
QProgressBar::textVisible 를참조하세요 .
© 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.