title: How to get QTabWidget title text of QWidget in Qt?
body: <p>I know I can use the widget function of QTabWidget in order to get the the QPlanTextEdit from the specified tab. But how can I get the tab title text of the current tab widget?</p>
  
  <pre><code>QPlainTextEdit* pTextEdit = NULL;
  QWidget* pWidget= ui-&gt;tabWidget-&gt;widget(1);
  if (pWidget-&gt;metaObject()-&gt;className() == "QPlainTextEdit")
      pTextEdit = (QPlainTextEdit*)pWidget;
  else
  {
      QList&lt;QPlainTextEdit *&gt; allTextEdits = pWidget-&gt;findChildren&lt;QPlainTextEdit *&gt;();
      if (allTextEdits.count() != 1)
      { 
          qError() &lt;&lt; "Error";
          return;
      }  
      pTextEdit = allTextEdits[0];
  }
  ptextEdit-&gt;setPlainText("Updated Plain Text Edit);
  // HERE I NEED THE CURRENT TAB'S TEXT!!
  </code></pre>