QTextLength Class
QTextLength 클래스는 QTextDocument.. . 더 보기....
헤더: | #include <QTextLength> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
- 상속된 멤버를 포함한 모든 멤버 목록
- QTextLength는 리치 텍스트 처리 API의 일부입니다.
참고: 이 클래스의 모든 함수는 재인용됩니다.
공용 유형
enum | Type { VariableLength, FixedLength, PercentageLength } |
공용 함수
QTextLength() | |
QTextLength(QTextLength::Type type, qreal value) | |
qreal | rawValue() const |
QTextLength::Type | type() const |
qreal | value(qreal maximumLength) const |
QVariant | operator QVariant() const |
bool | operator!=(const QTextLength &other) const |
bool | operator==(const QTextLength &other) const |
상세 설명
텍스트 문서에서 요소의 길이 값을 지정할 때, 길이가 예상하는 방식으로 사용되도록 다른 정보를 제공해야 하는 경우가 많습니다. 예를 들어 표 너비를 지정할 때 값은 고정된 픽셀 수를 나타내거나 백분율 값일 수 있습니다. 이 정보는 값의 의미와 사용 방식을 모두 변경합니다.
일반적으로 이 클래스는 표 너비를 지정하는 데 사용됩니다. 고정된 픽셀 수, 포함된 프레임 너비의 백분율 또는 필요한 공간만 차지할 수 있는 가변 너비로 지정할 수 있습니다.
QTextTable 를참조하세요 .
멤버 유형 문서
enum QTextLength::Type
이 열거형은 길이 객체가 가질 수 있는 다양한 유형을 설명합니다.
Constant | 값 | 설명 |
---|---|---|
QTextLength::VariableLength | 0 | 개체의 너비가 가변적입니다. |
QTextLength::FixedLength | 1 | 개체의 너비가 고정되어 있습니다. |
QTextLength::PercentageLength | 2 | 객체의 너비가 최대 너비의 백분율입니다. |
type()도 참조하세요 .
멤버 함수 문서
QTextLength::QTextLength()
가변 크기를 나타내는 새로운 길이 객체를 생성합니다.
[explicit]
QTextLength::QTextLength(QTextLength::Type type, qreal value)
주어진 type 과 value 의 새로운 길이 객체를 생성합니다.
qreal QTextLength::rawValue() const
길이 유형에 맞는 제약 조건 값을 반환합니다. 길이가 QTextLength::PercentageLength 인 경우 원시 값은 0에서 100 범위의 퍼센트 단위입니다. 길이가 QTextLength::FixedLength 인 경우 해당 고정 금액이 반환됩니다. 가변 길이의 경우 0이 반환됩니다.
QTextLength::Type QTextLength::type() const
이 길이 객체의 유형을 반환합니다.
QTextLength::Type 를참조하세요 .
qreal QTextLength::value(qreal maximumLength) const
길이 객체의 유형과 지정된 maximumLength 에 의해 제약된 유효 길이를 반환합니다.
type()도 참조하세요 .
QVariant QTextLength::operator QVariant() const
텍스트 길이를 QVariant
bool QTextLength::operator!=(const QTextLength &other) const
이 텍스트 길이가 other 텍스트 길이와 다른 경우 true
을 반환합니다.
bool QTextLength::operator==(const QTextLength &other) const
이 텍스트 길이가 other 텍스트 길이와 같으면 true
을 반환합니다.
© 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.