title: find children node from parent in Qt
body: <p>I have one QTabWidget and i am dynamically adding tab and toolbutton with the help of below code.</p>
  
  <pre><code>QTabWidget *m_tabWidget = new QTabWidget(this);
  m_addNewTab = new QWidget(m_tabWidget);
  m_addNewGridLayout = new QGridLayout(m_addNewTab);
  m_addNewWebView = new QWebView(m_addNewTab);
  
  widget = new QWidget(m_addNewTab);
  tb = new QToolButton(widget);
  tb1 = new QToolButton(widget);
  
  m_horizontalLayout = new QHBoxLayout(widget);
  m_horizontalLayout-&gt;addWidget(tb);
  m_horizontalLayout-&gt;addWidget(tb1);
  
  m_addNewGridLayout-&gt;addWidget(m_addNewWebView, 0, 0, 1, 1);
  m_tabWidget-&gt;addTab(m_addNewTab, QString());
  </code></pre>
  
  <p>After dynamically adding 3-4 tabs i want to get only QToolButton object.
  I have used below code to find the children of the parent widget.</p>
  
  <pre><code>for (tabCount = 0;tabCount &lt; m_tabWidget-&gt;count();tabCount++)
  {
      QWidget *tab = m_tabWidget-&gt;widget(tabCount);
      QList&lt;QWidget*&gt; widgetList = tab-&gt;findChildren&lt;QWidget*&gt;();
      foreach( QWidget* widgetPtr, widgetList )
      {
          qDebug() &lt;&lt; "Child Widget" &lt;&lt; widgetPtr;
      }
  }
  </code></pre>
  
  <p>Above code is only printing the "QWebView" pointer. Why not QToolButton object ? As we have given the parent in QToolButton.</p>
  
  <p>Can someone help  ?</p>
  
  <p>Thanks in Advance</p>