<?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[How to acces ui elements from another page?]]></title><description><![CDATA[<p dir="auto">I have a this code for get avaiable serial ports on Main Window.</p>
<pre><code>QString parsedPortName = QSerialPortInfo::availablePorts().at(ui -&gt; comboBoxDevices -&gt; currentIndex()).portName();
</code></pre>
<p dir="auto">I  need access this avaiable ports from another Page. Hiw can I do that?</p>
<p dir="auto">Here, on my Second Window I need replace avaiable comports with <code>(QString("COM3")</code></p>
<pre><code>if (serialStartStop.begin(QString("COM3"), 9600, 8, 0, 1, 0, false)  ) {
           serialStartStop.send("B" + ui-&gt;baslatmaedit-&gt;text().toLatin1() + "D"+  ui-&gt;durdurmaedit-&gt;text().toLatin1());

       }
</code></pre>
]]></description><link>https://forum.qt.io/topic/138150/how-to-acces-ui-elements-from-another-page</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 15:05:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/138150.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jul 2022 12:16:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to acces ui elements from another page? on Mon, 25 Jul 2022 17:42:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mangekoyu">@<bdi>mangekoyu</bdi></a><br />
You already know that: <code>QSerialPortInfo::availablePorts()</code>.</p>
<p dir="auto">Call that where you want them, or have main window call it and pass the result to some other window/page if that is how you want to do it.</p>
]]></description><link>https://forum.qt.io/post/722638</link><guid isPermaLink="true">https://forum.qt.io/post/722638</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 25 Jul 2022 17:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to How to acces ui elements from another page? on Mon, 25 Jul 2022 14:55:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/722587">How to acces ui elements from another page?</a>:</p>
<blockquote>
<p dir="auto">a pencere diğer pencereyi/sayfayı oluşturuyorsa, neden o pencerede/sayfada hangi bağlantı noktası</p>
</blockquote>
<p dir="auto">So, How can I get avaiable serial ports? I just need get avaiabvle serial ports.</p>
]]></description><link>https://forum.qt.io/post/722613</link><guid isPermaLink="true">https://forum.qt.io/post/722613</guid><dc:creator><![CDATA[mangekoyu]]></dc:creator><pubDate>Mon, 25 Jul 2022 14:55:28 GMT</pubDate></item><item><title><![CDATA[Reply to How to acces ui elements from another page? on Mon, 25 Jul 2022 14:24:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mangekoyu">@<bdi>mangekoyu</bdi></a><br />
It is not a good design decision to have other windows know about/call things in a main window you have.  It makes them dependent on there being a main window, and accessing it.</p>
<p dir="auto">If the main window creates the other window/page why not have it call a public method in that window/page to tell it which port has been selected?  Or emit a signal when the choice changes to which it has attached a slot in the other page/window which wants to know?</p>
]]></description><link>https://forum.qt.io/post/722587</link><guid isPermaLink="true">https://forum.qt.io/post/722587</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 25 Jul 2022 14:24:21 GMT</pubDate></item><item><title><![CDATA[Reply to How to acces ui elements from another page? on Mon, 25 Jul 2022 12:46:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> said in <a href="/post/722569">How to acces ui elements from another page?</a>:</p>
<blockquote>
<p dir="auto">I don't want select comport again on second wondow. Just I want get selected port on second window.</p>
</blockquote>
]]></description><link>https://forum.qt.io/post/722572</link><guid isPermaLink="true">https://forum.qt.io/post/722572</guid><dc:creator><![CDATA[mangekoyu]]></dc:creator><pubDate>Mon, 25 Jul 2022 12:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to How to acces ui elements from another page? on Mon, 25 Jul 2022 12:26:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mangekoyu">@<bdi>mangekoyu</bdi></a> said in <a href="/post/722566">How to acces ui elements from another page?</a>:</p>
<blockquote>
<p dir="auto">QSerialPortInfo::availablePorts()</p>
</blockquote>
<p dir="auto">availablePorts is a static method, so simply do it in the same way you are doing in MainWindow.<br />
Or what is the problem?</p>
]]></description><link>https://forum.qt.io/post/722569</link><guid isPermaLink="true">https://forum.qt.io/post/722569</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 25 Jul 2022 12:26:46 GMT</pubDate></item></channel></rss>