<?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[Ui, finding control by using literal string]]></title><description><![CDATA[<p dir="auto">I have a number of controls on a form, these have been named with an index after each name, e.g. lblT0, lblT1, lblT2 etc.</p>
<p dir="auto">The idea is that a bunch of controls do the same thing and have been copied into layouts, the form is resized to show the number of layouts applicable.  I need to be able to search for controls using the index of the control to update, how can I do this?  I've looked for methods to search for controls, I couldn't see anything.</p>
<p dir="auto">Something like:</p>
<ul>
<li>Look for iterator for QString("lblT%1").arg(index)</li>
<li>If iterator finds control, update control.</li>
</ul>
]]></description><link>https://forum.qt.io/topic/131333/ui-finding-control-by-using-literal-string</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 17:56:25 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131333.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Oct 2021 09:21:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 11:48:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> as stated beforehand</p>
<blockquote>
<p dir="auto">Layout cannot be parent of a widget...</p>
</blockquote>
<p dir="auto">use <code>&lt;widget class="QWidget" name="verticalLayoutWidget"&gt;</code>instead.</p>
]]></description><link>https://forum.qt.io/post/686241</link><guid isPermaLink="true">https://forum.qt.io/post/686241</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 22 Oct 2021 11:48:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 12:25:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> because findChild is a function of QObject</p>
<p dir="auto">However QWidgets based classes requiere a QWidget and not a QObject as a parent. Layouts are no QWidgets</p>
]]></description><link>https://forum.qt.io/post/686246</link><guid isPermaLink="true">https://forum.qt.io/post/686246</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 22 Oct 2021 12:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 11:51:46 GMT]]></title><description><![CDATA[<p dir="auto">@J-Hilk , thank you, trying that now, why when you dereference the layout does it come up with the <strong>findChild</strong> suggestion as well as others, it compiles with no errors or warnings?</p>
]]></description><link>https://forum.qt.io/post/686242</link><guid isPermaLink="true">https://forum.qt.io/post/686242</guid><dc:creator><![CDATA[SPlatten]]></dc:creator><pubDate>Fri, 22 Oct 2021 11:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 11:48:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> as stated beforehand</p>
<blockquote>
<p dir="auto">Layout cannot be parent of a widget...</p>
</blockquote>
<p dir="auto">use <code>&lt;widget class="QWidget" name="verticalLayoutWidget"&gt;</code>instead.</p>
]]></description><link>https://forum.qt.io/post/686241</link><guid isPermaLink="true">https://forum.qt.io/post/686241</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 22 Oct 2021 11:48:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 11:41:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , on my form I have a layout <strong>QVBoxLayout</strong> it has the name <strong>pvtloTrainees</strong>, this layout has lots of children, here is the UI:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ui version="4.0"&gt;
&lt;class&gt;SendRDF&lt;/class&gt;
&lt;widget class="QMainWindow" name="SendRDF"&gt;
  &lt;property name="windowModality"&gt;
   &lt;enum&gt;Qt::ApplicationModal&lt;/enum&gt;
  &lt;/property&gt;
  &lt;property name="geometry"&gt;
   &lt;rect&gt;
    &lt;x&gt;0&lt;/x&gt;
    &lt;y&gt;0&lt;/y&gt;
    &lt;width&gt;620&lt;/width&gt;
    &lt;height&gt;681&lt;/height&gt;
   &lt;/rect&gt;
  &lt;/property&gt;
  &lt;property name="minimumSize"&gt;
   &lt;size&gt;
    &lt;width&gt;492&lt;/width&gt;
    &lt;height&gt;108&lt;/height&gt;
   &lt;/size&gt;
  &lt;/property&gt;
  &lt;property name="styleSheet"&gt;
   &lt;string notr="true"&gt;QMainWindow{border:2px solid black;}&lt;/string&gt;
  &lt;/property&gt;
  &lt;widget class="QWidget" name="centralWidget"&gt;
   &lt;property name="sizePolicy"&gt;
    &lt;sizepolicy hsizetype="Minimum" vsizetype="Minimum"&gt;
     &lt;horstretch&gt;0&lt;/horstretch&gt;
     &lt;verstretch&gt;0&lt;/verstretch&gt;
    &lt;/sizepolicy&gt;
   &lt;/property&gt;
   &lt;layout class="QGridLayout" name="gridLayout"&gt;
    &lt;item row="0" column="0"&gt;
     &lt;widget class="QLabel" name="label"&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;RDF file:&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name="alignment"&gt;
       &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
   &lt;/item&gt;
    &lt;item row="0" column="1" colspan="3"&gt;
     &lt;widget class="QLabel" name="plblFilename"&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;Device, path and filename&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="1" column="0"&gt;
     &lt;widget class="QLabel" name="label_2"&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;File size:&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name="alignment"&gt;
       &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="1" column="1"&gt;
     &lt;widget class="QLabel" name="plblFilesize"&gt;
      &lt;property name="contextMenuPolicy"&gt;
       &lt;enum&gt;Qt::NoContextMenu&lt;/enum&gt;
      &lt;/property&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;##########&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name="alignment"&gt;
       &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="1" column="2" colspan="3"&gt;
     &lt;spacer name="horizontalSpacer"&gt;
      &lt;property name="orientation"&gt;
       &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
      &lt;/property&gt;
      &lt;property name="sizeHint" stdset="0"&gt;
       &lt;size&gt;
        &lt;width&gt;40&lt;/width&gt;
        &lt;height&gt;20&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
     &lt;/spacer&gt;
    &lt;/item&gt;
    &lt;item row="1" column="5"&gt;
     &lt;widget class="QLabel" name="label_5"&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;Elapsed:&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="1" column="6"&gt;
     &lt;widget class="QLabel" name="plblElapsed"&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;##:##:##.###&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="2" column="0" colspan="7"&gt;
     &lt;widget class="QGroupBox" name="pgrpTrainees"&gt;
      &lt;property name="sizePolicy"&gt;
       &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
        &lt;horstretch&gt;1&lt;/horstretch&gt;
        &lt;verstretch&gt;1&lt;/verstretch&gt;
       &lt;/sizepolicy&gt;
      &lt;/property&gt;
      &lt;property name="title"&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name="flat"&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
      &lt;widget class="QWidget" name="verticalLayoutWidget"&gt;
       &lt;property name="geometry"&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;0&lt;/y&gt;
         &lt;width&gt;600&lt;/width&gt;
         &lt;height&gt;585&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;layout class="QVBoxLayout" name="pvtloTrainees"&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT0"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT0"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT0"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN0"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT0"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks0"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB0"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE0"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT0"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT1"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT1"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT1"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN1"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT1"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks1"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
             &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB1"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE1"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT1"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
        &lt;layout class="QVBoxLayout" name="pvbloT2"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT2"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT2"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN2"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT2"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks2"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB2"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE2"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT2"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT3"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT3"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT3"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN3"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT3"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks3"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB3"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT3"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT4"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT4"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT4"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN4"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT4"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks4"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB4"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE4"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT4"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT5"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT5"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT5"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
             &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
             &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN5"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT5"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks5"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB5"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE5"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT5"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT6"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT6"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT6"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
                &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN6"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT6"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks6"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB6"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE6"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
             &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT6"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
        &lt;item&gt;
         &lt;layout class="QVBoxLayout" name="pvbloT7"&gt;
          &lt;item&gt;
           &lt;layout class="QHBoxLayout" name="phzloT7"&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblT7"&gt;
              &lt;property name="enabled"&gt;
               &lt;bool&gt;true&lt;/bool&gt;
              &lt;/property&gt;
              &lt;property name="sizePolicy"&gt;
               &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
               &lt;horstretch&gt;0&lt;/horstretch&gt;
                &lt;verstretch&gt;0&lt;/verstretch&gt;
               &lt;/sizepolicy&gt;
              &lt;/property&gt;
              &lt;property name="styleSheet"&gt;
               &lt;string notr="true"/&gt;
              &lt;/property&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Trainee:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTN7"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/string&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;spacer name="sprT7"&gt;
              &lt;property name="orientation"&gt;
               &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
              &lt;/property&gt;
              &lt;property name="sizeHint" stdset="0"&gt;
               &lt;size&gt;
                &lt;width&gt;40&lt;/width&gt;
                &lt;height&gt;20&lt;/height&gt;
               &lt;/size&gt;
              &lt;/property&gt;
             &lt;/spacer&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTBlocks7"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;Blocks:&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
            &lt;item&gt;
             &lt;widget class="QLabel" name="plblTB7"&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;#######&lt;/string&gt;
              &lt;/property&gt;
              &lt;property name="alignment"&gt;
               &lt;set&gt;Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter&lt;/set&gt;
              &lt;/property&gt;
             &lt;/widget&gt;
            &lt;/item&gt;
           &lt;/layout&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QLabel" name="plblTE7"&gt;
            &lt;property name="sizePolicy"&gt;
             &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt;
              &lt;horstretch&gt;0&lt;/horstretch&gt;
              &lt;verstretch&gt;0&lt;/verstretch&gt;
             &lt;/sizepolicy&gt;
            &lt;/property&gt;
            &lt;property name="layoutDirection"&gt;
            &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="styleSheet"&gt;
             &lt;string notr="true"&gt;background-color:#ff0000;color:#ffff00;font-weight:bold;&lt;/string&gt;
            &lt;/property&gt;
            &lt;property name="text"&gt;
             &lt;string/&gt;
            &lt;/property&gt;
            &lt;property name="textFormat"&gt;
             &lt;enum&gt;Qt::AutoText&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="alignment"&gt;
             &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QProgressBar" name="ppgbT7"&gt;
            &lt;property name="value"&gt;
             &lt;number&gt;0&lt;/number&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/item&gt;
       &lt;/layout&gt;
      &lt;/widget&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
    &lt;item row="4" column="6"&gt;
     &lt;widget class="QPushButton" name="pbtnAbort"&gt;
      &lt;property name="minimumSize"&gt;
       &lt;size&gt;
        &lt;width&gt;80&lt;/width&gt;
        &lt;height&gt;24&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name="text"&gt;
       &lt;string&gt;&amp;amp;Abort&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/item&gt;
   &lt;/layout&gt;
  &lt;/widget&gt;
&lt;/widget&gt;
&lt;resources/&gt;
&lt;connections/&gt;
&lt;/ui&gt;
</code></pre>
<p dir="auto">I am trying to locate a widget that is a child of this layout with:</p>
<pre><code>QWidget* pobjFound(mpui-&gt;pvtloTrainees-&gt;findChild&lt;QWidget*&gt;(cstrCtrlKey));
</code></pre>
<p dir="auto">Where <strong>cstrCtrlKey</strong> is a string containing something like <strong>ppgbT0</strong>, but <strong>pobjFound</strong> is returned as <strong>0x0</strong> ?</p>
]]></description><link>https://forum.qt.io/post/686239</link><guid isPermaLink="true">https://forum.qt.io/post/686239</guid><dc:creator><![CDATA[SPlatten]]></dc:creator><pubDate>Fri, 22 Oct 2021 11:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:44:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> Layout cannot be parent of a widget...<br />
Simply use the widget containing this layout and the child widgets...</p>
]]></description><link>https://forum.qt.io/post/686220</link><guid isPermaLink="true">https://forum.qt.io/post/686220</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:44:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , I have a layout that contains all the controls, can I use that to speed up the search?</p>
<p dir="auto">@J-Hilk , <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , thank you, have added:</p>
<pre><code>ui-&gt;pvtloTrainees-&gt;findChild("...");
</code></pre>
]]></description><link>https://forum.qt.io/post/686219</link><guid isPermaLink="true">https://forum.qt.io/post/686219</guid><dc:creator><![CDATA[SPlatten]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:42:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> You pass the pointer to the parent widget which contains the widgets you want to search...</p>
]]></description><link>https://forum.qt.io/post/686218</link><guid isPermaLink="true">https://forum.qt.io/post/686218</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:41:37 GMT]]></title><description><![CDATA[<p dir="auto">just an annotation, if you call findChildren on your root element of your Ui it will be a very slow function call, as it recursively goes through all the children!</p>
<p dir="auto">Either accept that, narrow the search down, by wisely selection the QObject to search on or, what I prefer,  store the objects in a member list/vector/array</p>
]]></description><link>https://forum.qt.io/post/686217</link><guid isPermaLink="true">https://forum.qt.io/post/686217</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:41:37 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:40:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , thank you, if I have the <strong>ui</strong> pointer how do I use this with <strong>findChildren</strong> ?</p>
]]></description><link>https://forum.qt.io/post/686216</link><guid isPermaLink="true">https://forum.qt.io/post/686216</guid><dc:creator><![CDATA[SPlatten]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:40:07 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:38:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> Isn't <a href="https://doc.qt.io/qt-5/qobject.html#findChildren" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qobject.html#findChildren</a> what you need?</p>
]]></description><link>https://forum.qt.io/post/686215</link><guid isPermaLink="true">https://forum.qt.io/post/686215</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:38:17 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:37:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , I want to address by objectName, so for example, something like:</p>
<pre><code>QProgressBar* pBar(ui-&gt;find("name"));
pBar-&gt;setValue(123);
</code></pre>
]]></description><link>https://forum.qt.io/post/686214</link><guid isPermaLink="true">https://forum.qt.io/post/686214</guid><dc:creator><![CDATA[SPlatten]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:37:21 GMT</pubDate></item><item><title><![CDATA[Reply to Ui, finding control by using literal string on Fri, 22 Oct 2021 09:35:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/splatten">@<bdi>SPlatten</bdi></a> said in <a href="/post/686206">Ui, finding control by using literal string</a>:</p>
<blockquote>
<p dir="auto">these have been named with an index after each name, e.g. lblT0, lblT1, lblT2 etc.</p>
</blockquote>
<p dir="auto">Do you mean variable names or objectName?<br />
<a href="https://doc.qt.io/qt-5/qobject.html#findChildren" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qobject.html#findChildren</a></p>
]]></description><link>https://forum.qt.io/post/686213</link><guid isPermaLink="true">https://forum.qt.io/post/686213</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 22 Oct 2021 09:35:47 GMT</pubDate></item></channel></rss>