Looping over widgets inside widgets inside layouts
<p>Similar question to what we have here <a href="http://stackoverflow.com/questions/5150182/loop-over-widgets-in-pyqt-layout">Loop over widgets in PyQt Layout</a> but a bit more complex...</p>

<p>I have</p>

<pre><code>QVGridLayout
   QGroupBox
      QGridLayout
         QLineEdit
</code></pre>

<p>I'd like to access QLineEdit but so far I dont know how to access children of QGroupBox</p>

<pre><code>        for i in range(self.GridLayout.count()):
            item = self.GridLayout.itemAt(i)
            for i in range(item.count()):
                lay = item.itemAt(i)
                edit = lay.findChildren(QLineEdit)
                print edit.text()
</code></pre>

<p>Can any1 point me to right dirrection?</p>

<p>Sorted :</p>

<pre><code>for i in range(self.GridLayout.count()):
     item = self.GridLayout.itemAt(i)
     if type(item.widget()) == QGroupBox:
          child =  item.widget().children()
</code></pre>

<p>I had to use item.widget() to get access to GroupBox. 
Hope this helps some1. </p>

python pyqt qgroupbox