Qt Namespace
Qt 네임스페이스는 QtGui 모듈의 다음 요소를 포함합니다. 전체 네임스페이스는 QtCore 모듈에 문서화되어 있습니다. here.
함수
QString | convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre) |
bool | mightBeRichText(QAnyStringView text) |
함수 문서
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre)
일반 텍스트 문자열 plain 을 대부분의 모양을 유지하면서 HTML 형식의 단락으로 변환합니다.
mode 공백 처리 방법을 정의합니다.
이 함수는 <QTextDocument>
헤더 파일에 정의되어 있습니다.
QString::toHtmlEscaped() 및 mightBeRichText()도 참조하세요 .
bool Qt::mightBeRichText(QAnyStringView text)
text 문자열이 서식 있는 텍스트일 가능성이 높으면 true
를 반환하고, 그렇지 않으면 false
를 반환합니다.
이 함수는 빠르고 간단한 휴리스틱을 사용합니다. 주로 첫 줄 바꿈 앞에 태그처럼 보이는 것이 있는지 여부를 확인합니다. 일반적인 경우에는 결과가 정확할 수 있지만 보장할 수는 없습니다.
이 함수는 <QTextDocument>
헤더 파일에 정의되어 있습니다.
참고: 6.7 이전 Qt 버전에서는 이 함수는 QString 만 사용했습니다.
© 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.