QTextImageFormat Class

QTextImageFormat 클래스는 QTextDocument.. . 더보기...

헤더: #include <QTextImageFormat>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
상속합니다: QTextCharFormat

참고: 이 클래스의 모든 함수는 재진입됩니다.

공용 함수

QTextImageFormat()
qreal height() const
bool isValid() const
QTextLength maximumWidth() const
QString name() const
int quality() const
void setHeight(qreal height)
void setMaximumWidth(QTextLength maximumWidth)
void setName(const QString &name)
void setQuality(int quality = 100)
void setWidth(qreal width)
qreal width() const

상세 설명

인라인 이미지는 유니코드 값 U+FFFC(객체 대체 문자)로 표현되며, 이 값은 QTextImageFormat과 연관되어 있습니다. 이미지 형식은 이미지를 찾는 데 사용되는 setName()가 포함된 이름을 지정합니다. 이미지가 차지할 사각형의 크기는 setWidth() 및 setHeight()를 사용하여 픽셀 단위로 지정합니다. 원하는 이미지 품질은 setQuality()로 설정할 수 있습니다.

이미지는 Qt에 이미지 판독기가 있는 모든 형식으로 제공될 수 있으므로 SVG 도면은 PNG, TIFF 및 기타 비트맵 형식과 함께 포함될 수 있습니다.

QImageQImageReader참조하십시오 .

멤버 함수 문서

QTextImageFormat::QTextImageFormat()

새 이미지 형식 개체를 만듭니다.

qreal QTextImageFormat::height() const

이미지가 차지하는 직사각형의 높이를 반환합니다.

width() 및 setHeight()도 참조하세요 .

bool QTextImageFormat::isValid() const

이 이미지 형식이 유효하면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

QTextLength QTextImageFormat::maximumWidth() const

이미지가 차지하는 직사각형의 최대 너비를 반환합니다.

width() 및 setMaximumWidth()도 참조하세요 .

QString QTextImageFormat::name() const

이미지의 이름을 반환합니다. 이름은 애플리케이션의 리소스 파일에 있는 항목을 참조합니다.

setName()도 참조하세요 .

int QTextImageFormat::quality() const

setQuality()에서 설정한 값을 반환합니다.

setQuality()도 참조하세요 .

void QTextImageFormat::setHeight(qreal height)

이미지가 차지하는 직사각형의 height 을 설정합니다.

height() 및 setWidth()도 참조하세요 .

void QTextImageFormat::setMaximumWidth(QTextLength maximumWidth)

이미지가 차지하는 사각형의 maximumWidth 을 설정합니다. 이 값은 절대 숫자 또는 사용 가능한 문서 크기의 백분율일 수 있습니다.

maximumWidth(), width() 및 setHeight()도 참조하세요 .

void QTextImageFormat::setName(const QString &name)

이미지의 name 을 설정합니다. name 은 애플리케이션의 리소스에서 이미지를 찾는 데 사용됩니다.

name()도 참조하세요 .

void QTextImageFormat::setQuality(int quality = 100)

QTextDocumentWriter 이미지를 내보낼 때 내보내기가 사용할 품질을 설정합니다. quality 이 0에서 100 사이의 값으로 설정된 경우 ODF 파일로 내보낼 때 quality 이 설정된 jpg 이미지를 내보냅니다. 또는 quality 이 100(기본값) 이상으로 설정된 경우 png 이미지를 내보냅니다.

quality()도 참조하세요 .

void QTextImageFormat::setWidth(qreal width)

이미지가 차지하는 직사각형의 width 을 설정합니다.

width(), setHeight() 및 maximumWidth()도 참조하세요 .

qreal QTextImageFormat::width() const

이미지가 차지하는 사각형의 너비를 반환합니다.

height() 및 setWidth()도 참조하세요 .

© 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.