title: QStandardItemModel inside Qtableview
body: <p>I am using <code>QStandardItemModel</code> inside <code>QTableView</code>. Here i have two button &amp; <code>Qtableview</code> inside my mainwindow.
  I need only 4 columns inside this. And rows will vary. The two Buttons will be used to add/delete a row (test case). </p>
  
  <ol>
  <li><code>setHorizontalHeaderItem</code> is not showing all the text(means all text is not visible). Example if i put <code>'Text for the Employee Name'</code> it is not fully visible ?  </li>
  <li>How to make <code>QStandardItemModel</code> occupy full <code>QTableview</code> (<code>width</code>). At present it is showing at top left corner ?</li>
  </ol>
  
  <p>How to achieve it?</p>
  
  <p>Code :</p>
  
  <pre><code>model= new QStandardItemModel(4, 4);
  
      for (int row = 0; row &lt; 4; ++row) {
          for (int column = 0; column &lt; 4; ++column) {
              QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
              model-&gt;setItem(row, column, item);
          }
      }
  
      model-&gt;setHorizontalHeaderItem(0, new QStandardItem(tr("Time")));
      model-&gt;setHorizontalHeaderItem(1, new QStandardItem(tr("Text for the Employee Name")));
      model-&gt;setHorizontalHeaderItem(2, new QStandardItem(tr("Text for the Employee Address")));
      model-&gt;setHorizontalHeaderItem(3, new QStandardItem(tr("Text for the Employee Date of Birth")));
  
      model-&gt;setVerticalHeaderItem(0, new QStandardItem(tr("Test-Case-----1")));
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/mFqvJ.png" alt="enter image description here"></p>