PySide6.QtGui.Qt¶
- class Qt¶
Synopsis¶
Static functions¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- static convertFromPlainText(plain[, mode=Qt.WhiteSpaceMode.WhiteSpacePre])¶
- Parameters:
plain – str
mode –
WhiteSpaceMode
- Return type:
str
Converts the plain text string
plain
to an HTML-formatted paragraph while preserving most of its look.mode
defines how whitespace is handled.This function is defined in the
<QTextDocument>
header file.See also
- static mightBeRichText(text)¶
- Parameters:
text – str
- Return type:
bool
Returns
true
if the stringtext
is likely to be rich text; otherwise returnsfalse
.This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.
This function is defined in the
<QTextDocument>
header file.Note
In Qt versions prior to 6.7, this function took QString only.