title: Tab text alignment in QTabWidget
body: <p>I am using QTabWidget class of Qt. 
  In TabWidget i am dynamically adding new tab and setting the TextElideMode to right to display the toolbutton in tabBar.</p>
  
  <pre><code>tabWidget = new QTabWidget(this);
  m_addNewTab = new QWidget(tabWidget);
  m_addNewGridLayout = new QGridLayout(m_addNewTab);
  m_addNewWebView = new MyWebView(m_addNewTab);
  widget = new QWidget(m_addNewTab);
  tb = new QToolButton(widget);
  tb-&gt;setFixedHeight(20);
  tb-&gt;setText("&lt;");
  tb1 = new QToolButton(widget);
  tb1-&gt;setFixedHeight(20);
  tb1-&gt;setText("&gt;");
  
  m_horizontalLayout = new QHBoxLayout(widget);
  m_horizontalLayout-&gt;addWidget(tb);
  m_horizontalLayout-&gt;addWidget(tb1);
  </code></pre>
  
  <p>Please see the below screen shot for the output of the sample application.
  When the current tab is selected then both the toolbutton should display and text elide mode should be right but when tab is not selected then toolbutton should not be displayed but text elide mode should be left.</p>
  
  <p>Here in below screen shot i am able to hide and show the toolbutton depending on tab selection but when the tab is not selected text elide mode is setting as right so we are able to see the unnecessary space (check last tab). Setting the text elide mode left also not working because we  have already set the toolbutton at left side.</p>
  
  <p>Can someone guide me how to remove the space (last tab from screen shot) when there is not tab selected ?</p>
  
  <p><a href="https://i.stack.imgur.com/F3n9z.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F3n9z.jpg" alt="enter image description here"></a></p>