title: get widgets by name from layout
body: <p>How should I proceed if I want to get an especific widget from a layout in python Qt?</p>
  
  <p>What I have done so far:</p>
  
  <pre><code>for i in range(self.ui.horizontalLayout_14.count()): 
      #here it does fail
      name = self.ui.horizontalLayout_14.itemAt(i).objectName()
  
      #if the above would had worked, then I could do something like this for example
      if "button" in name:
          self.ui.horizontalLayout_14.itemAt(i).widget().close()
  </code></pre>
  
  <p>Note that, for the example, I am using <code>button</code> but It might be whatever widget inside the layout, lineEdit, or comboBox, labels, etc etc, but not all of them though.</p>