1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QErrorMessage Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QErrorMessage Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QErrorMessage class provides an error message display dialog. <a href="#details">More...</a></p>
<p>Inherits <a href="qdialog.html">QDialog</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qerrormessage.html#QErrorMessage">__init__</a></b> (<i>self</i>, QWidget <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qerrormessage.html#done">done</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qerrormessage.html#showMessage">showMessage</a></b> (<i>self</i>, QString <i>message</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QErrorMessage <b><a href="qerrormessage.html#qtHandler">qtHandler</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QErrorMessage class provides an error message display dialog.</p>
<p>An error message widget consists of a text label and a checkbox. The checkbox lets the user control whether the same error message will be displayed again in the future, typically displaying the text, "Show this message again" translated into the appropriate local language.</p>
<p>For production applications, the class can be used to display messages which the user only needs to see once. To use QErrorMessage like this, you create the dialog in the usual way, and show it by calling the <a href="qerrormessage.html#showMessage">showMessage</a>() slot or connecting signals to it.</p>
<p>The static <a href="qerrormessage.html#qtHandler">qtHandler</a>() function installs a message handler using <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>() and creates a QErrorMessage that displays <a href="qtcore.html#qDebug">qDebug</a>(), <a href="qtcore.html#qWarning">qWarning</a>() and <a href="qtcore.html#qFatal">qFatal</a>() messages. This is most useful in environments where no console is available to display warnings and error messages.</p>
<p>In both cases QErrorMessage will queue pending messages and display them in order, with each new message being shown as soon as the user has accepted the previous message. Once the user has specified that a message is not to be shown again it is automatically skipped, and the dialog will show the next appropriate message in the queue.</p>
<p>The <a href="dialogs-standarddialogs.html">Standard Dialogs</a> example shows how to use QErrorMessage as well as other built-in Qt dialogs.</p>
<p align="center"><img src="images/qerrormessage.png" /></p>
<p>See also <a href="qmessagebox.html">QMessageBox</a> and <a href="qstatusbar.html#showMessage">QStatusBar.showMessage</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QErrorMessage" />QErrorMessage.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs and installs an error handler window with the given <i>parent</i>.</p>
<h3 class="fn"><a name="done" />QErrorMessage.done (<i>self</i>, int)</h3><h3 class="fn"><a name="qtHandler" /><a href="qerrormessage.html">QErrorMessage</a> QErrorMessage.qtHandler ()</h3><p>Returns a pointer to a <a href="qerrormessage.html">QErrorMessage</a> object that outputs the default Qt messages. This function creates such an object, if there isn't one already.</p>
<h3 class="fn"><a name="showMessage" />QErrorMessage.showMessage (<i>self</i>, <a href="qstring.html">QString</a> <i>message</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void showMessage(const QString&)</tt>.</p><p>Shows the given <i>message</i>, and returns immediately. This function does nothing if the user has requested that <i>message</i> should not be shown again.</p>
<p>Normally, <i>message</i> is shown at once, but if there are pending messages, <i>message</i> is queued for later display.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|