<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qcoreapplication.cpp --> <title>Obsolete Members for QCoreApplication | Qt Core 5.9</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.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QCoreApplication</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Obsolete Members for QCoreApplication</h1> <p><b>The following members of class <a href="qcoreapplication.html">QCoreApplication</a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p> <h2>Public Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>enum </td><td class="memItemRight bottomAlign"><b><a href="qcoreapplication-obsolete.html#Encoding-enum">Encoding</a></b> { UnicodeUTF8 }</td></tr> </table></div> <h2>Static Public Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qcoreapplication-obsolete.html#flush">flush</a></b>()</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>bool </td><td class="memItemRight bottomAlign"><b><a href="qcoreapplication-obsolete.html#hasPendingEvents">hasPendingEvents</a></b>()</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QString </td><td class="memItemRight bottomAlign"><b><a href="qcoreapplication-obsolete.html#translate-1">translate</a></b>(const char *<i>context</i>, const char *<i>key</i>, const char *<i>disambiguation</i>, Encoding <i>encoding</i>, int <i>n</i> = -1)</td></tr> </table></div> <ul> <li class="fn">1 static public member inherited from <a href="qobject.html#static-public-members">QObject</a></li> </ul> <h2>Member Type Documentation</h2> <!-- $$$Encoding$$$UnicodeUTF8$$$Latin1$$$DefaultCodec$$$CodecForTr --> <h3 class="fn" id="Encoding-enum"><a name="Encoding-enum"></a>enum QCoreApplication::<span class="name">Encoding</span></h3> <p>This enum type used to define the 8-bit encoding of character string arguments to <a href="qcoreapplication.html#translate">translate</a>(). This enum is now obsolete and UTF-8 will be used in all cases.</p> <div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><code>QCoreApplication::UnicodeUTF8</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">UTF-8. UTF-8.</td></tr> </table></div> <p><b>See also </b><a href="qobject.html#tr">QObject::tr</a>() and <a href="qstring.html#fromUtf8">QString::fromUtf8</a>().</p> <!-- @@@Encoding --> <h2>Member Function Documentation</h2> <!-- $$$flush[overload1]$$$flush --> <h3 class="fn" id="flush"><a name="flush"></a><code>[static] </code><span class="type">void</span> QCoreApplication::<span class="name">flush</span>()</h3> <p>This function is equivalent to calling <code>QCoreApplication::eventDispatcher()->flush()</code>, which also is deprecated, see <a href="qabstracteventdispatcher-obsolete.html#flush">QAbstractEventDispatcher::flush</a>(). Use <a href="qcoreapplication.html#sendPostedEvents">sendPostedEvents</a>() and <a href="qcoreapplication.html#processEvents">processEvents</a>() for more fine-grained control of the event loop instead.</p> <p>Historically this functions was used to flush the platform-specific native event queues.</p> <p><b>See also </b><a href="qcoreapplication.html#sendPostedEvents">sendPostedEvents</a>(), <a href="qcoreapplication.html#processEvents">processEvents</a>(), and <a href="qabstracteventdispatcher-obsolete.html#flush">QAbstractEventDispatcher::flush</a>().</p> <!-- @@@flush --> <!-- $$$hasPendingEvents[overload1]$$$hasPendingEvents --> <h3 class="fn" id="hasPendingEvents"><a name="hasPendingEvents"></a><code>[static] </code><span class="type">bool</span> QCoreApplication::<span class="name">hasPendingEvents</span>()</h3> <p>This function returns <code>true</code> if there are pending events; otherwise returns <code>false</code>. Pending events can be either from the window system or posted events using <a href="qcoreapplication.html#postEvent">postEvent</a>().</p> <p><b>Note: </b>this function is not thread-safe. It may only be called in the main thread and only if there are no other threads running in the application (including threads Qt starts for its own purposes).</p><p><b>See also </b><a href="qabstracteventdispatcher-obsolete.html#hasPendingEvents">QAbstractEventDispatcher::hasPendingEvents</a>().</p> <!-- @@@hasPendingEvents --> <!-- $$$translate$$$translateconstchar*constchar*constchar*Encodingint --> <h3 class="fn" id="translate-1"><a name="translate-1"></a><code>[static] </code><span class="type"><a href="qstring.html">QString</a></span> QCoreApplication::<span class="name">translate</span>(const <span class="type">char</span> *<i>context</i>, const <span class="type">char</span> *<i>key</i>, const <span class="type">char</span> *<i>disambiguation</i>, <span class="type"><a href="qcoreapplication-obsolete.html#Encoding-enum">Encoding</a></span> <i>encoding</i>, <span class="type">int</span> <i>n</i> = -1)</h3> <!-- @@@translate --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 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>