<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Press Escape key in QmessageBox Close Parent Window]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I'm using Qt5.1.0 in Ubuntu 13.04. The problem was  I developed a Dialog based Application, in that app I had a warning message box with ok button and message box was modal. when message box appeared, I click Escape key without pressing of ok button to close message box, both message box and parent were closed. whats wrong in message box... any suggesstions please..</p>
]]></description><link>https://forum.qt.io/topic/35953/press-escape-key-in-qmessagebox-close-parent-window</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 23:52:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/35953.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Dec 2013 08:49:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Press Escape key in QmessageBox Close Parent Window on Mon, 30 Dec 2013 06:53:22 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, Its works.. But I already use keypressevent in eventfilter, why that didn't work..</p>
]]></description><link>https://forum.qt.io/post/208855</link><guid isPermaLink="true">https://forum.qt.io/post/208855</guid><dc:creator><![CDATA[guru]]></dc:creator><pubDate>Mon, 30 Dec 2013 06:53:22 GMT</pubDate></item><item><title><![CDATA[Reply to Press Escape key in QmessageBox Close Parent Window on Sat, 28 Dec 2013 18:05:29 GMT]]></title><description><![CDATA[<p dir="auto">By default the Escape key closes the Dialog windows on Qt.<br />
But did you get any error? Why is this a problem?</p>
<p dir="auto">If you want to eliminate this behaviour you should override the keyPressEvent function on your Dialog class the following:<br />
@MyDialog::keyPressEvent(QKeyEvent *e) {<br />
if(e-&gt;key() != Qt::Key_Escape)<br />
QDialog::keyPressEvent(e);<br />
}@</p>
]]></description><link>https://forum.qt.io/post/208715</link><guid isPermaLink="true">https://forum.qt.io/post/208715</guid><dc:creator><![CDATA[Seba84]]></dc:creator><pubDate>Sat, 28 Dec 2013 18:05:29 GMT</pubDate></item></channel></rss>