<?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[accessing the QPushButton of QWindow]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I have one Qt destkop application in which I am having one QWindow  with some QlineEdits and QPushButtons. I am this app I am using .exec() function to show my window. Now I have to write QTest to check the functionality of the QPushButton which is used in that window. Here is one issue that I am using .exec() function so it will go in a loop and it not execute the main thread until I close the window. So I want to ask that is there any way to access the QPushButton in the QTest while that window in executed.</p>
]]></description><link>https://forum.qt.io/topic/146213/accessing-the-qpushbutton-of-qwindow</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 09:38:32 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/146213.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Jul 2023 11:16:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to accessing the QPushButton of QWindow on Thu, 06 Jul 2023 19:33:48 GMT]]></title><description><![CDATA[<p dir="auto">No, not show, open which allows to have the same blocking effect as exec without requiring a second event loop.</p>
]]></description><link>https://forum.qt.io/post/763891</link><guid isPermaLink="true">https://forum.qt.io/post/763891</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 06 Jul 2023 19:33:48 GMT</pubDate></item><item><title><![CDATA[Reply to accessing the QPushButton of QWindow on Thu, 06 Jul 2023 07:57:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Thank you for your suggestion, So, you telling about show() method or you taking about some other method.<br />
So in my case I am using exec() to open the window because it will enter in a new loop and won't allow the main thread to execute further code until you close the window. I am using this because I don't want the user do something else while this window is open. So now I want to test this window.</p>
]]></description><link>https://forum.qt.io/post/763800</link><guid isPermaLink="true">https://forum.qt.io/post/763800</guid><dc:creator><![CDATA[Het Aghera]]></dc:creator><pubDate>Thu, 06 Jul 2023 07:57:57 GMT</pubDate></item><item><title><![CDATA[Reply to accessing the QPushButton of QWindow on Wed, 05 Jul 2023 20:11:50 GMT]]></title><description><![CDATA[<p dir="auto">So it's a good start. Usually, when designing a widget such as a dialog, it should be usable without calling exec but using the open method. Hence my recommendation would be to ensure that yours can be used with open to make it properly testable.</p>
]]></description><link>https://forum.qt.io/post/763748</link><guid isPermaLink="true">https://forum.qt.io/post/763748</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 05 Jul 2023 20:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to accessing the QPushButton of QWindow on Wed, 05 Jul 2023 05:15:50 GMT]]></title><description><![CDATA[<p dir="auto">Yes I have already read the documentation but there nothing related to my query.</p>
]]></description><link>https://forum.qt.io/post/763664</link><guid isPermaLink="true">https://forum.qt.io/post/763664</guid><dc:creator><![CDATA[Het Aghera]]></dc:creator><pubDate>Wed, 05 Jul 2023 05:15:50 GMT</pubDate></item><item><title><![CDATA[Reply to accessing the QPushButton of QWindow on Tue, 04 Jul 2023 19:54:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Did you already read this <a href="https://doc.qt.io/qt-6/qttestlib-tutorial3-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">tutorial</a> in Qt's documentation ?</p>
]]></description><link>https://forum.qt.io/post/763619</link><guid isPermaLink="true">https://forum.qt.io/post/763619</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 04 Jul 2023 19:54:03 GMT</pubDate></item></channel></rss>