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> ヘッダーファイルで定義されています。

注意: Qt 6.7より前のバージョンでは、この関数は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.