<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Qt Namespace | Qt GUI 5.12.2</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtgui-index.html">Qt GUI</a></td><td >Qt Namespace</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.12.2 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#functions">Functions</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Qt Namespace</h1> <p>The Qt namespace includes the following elements from module QtGui. The full namespace is documented in module QtCore<a href="../qtcore/qt.html"> here.</a></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr></table></div><ul> </ul> <a name="functions"></a> <h2 id="functions">Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qt-sub-qtgui.html#convertFromPlainText">convertFromPlainText</a></b>(const QString &<i>plain</i>, Qt::WhiteSpaceMode <i>mode</i> = WhiteSpacePre)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qt-sub-qtgui.html#mightBeRichText">mightBeRichText</a></b>(const QString &<i>text</i>)</td></tr> </table></div> <a name="details"></a> <div class="func"> <h2>Function Documentation</h2> <!-- $$$convertFromPlainText[overload1]$$$convertFromPlainTextconstQString&Qt::WhiteSpaceMode --> <h3 class="fn" id="convertFromPlainText"><a name="convertFromPlainText"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> Qt::<span class="name">convertFromPlainText</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>plain</i>, <span class="type"><a href="../qtcore/qt.html#WhiteSpaceMode-enum">Qt::WhiteSpaceMode</a></span> <i>mode</i> = WhiteSpacePre)</h3> <p>Converts the plain text string <i>plain</i> to an HTML-formatted paragraph while preserving most of its look.</p> <p><i>mode</i> defines how whitespace is handled.</p> <p>This function is defined in the <code><QTextDocument></code> header file.</p> <p><b>See also </b><a href="../qtcore/qstring.html#toHtmlEscaped">QString::toHtmlEscaped</a>() and <a href="qt-sub-qtgui.html#mightBeRichText">mightBeRichText</a>().</p> <!-- @@@convertFromPlainText --> <!-- $$$mightBeRichText[overload1]$$$mightBeRichTextconstQString& --> <h3 class="fn" id="mightBeRichText"><a name="mightBeRichText"></a><span class="type">bool</span> Qt::<span class="name">mightBeRichText</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>text</i>)</h3> <p>Returns <code>true</code> if the string <i>text</i> is likely to be rich text; otherwise returns <code>false</code>.</p> <p>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.</p> <p>This function is defined in the <code><QTextDocument></code> header file.</p> <!-- @@@mightBeRichText --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> 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. </p> </div> </body> </html>