title: Qt QTableWidget QDoubleSpinBoxes/QSpinBoxes as elements accessing values by Iteration
body: <p>I create a table with two rows and two columns:</p>
  
  <p><img src="https://i.stack.imgur.com/yhrkC.jpg" alt="enter image description here"></p>
  
  <p>The second column contains spinBoxes as elements. The code is the following:</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      myTable = ui-&gt;tableWidget;
  
  for( int i = 0; i &lt; myTable-&gt;rowCount(); i++ )
      {
        QDoubleSpinBox *spinBox = new QDoubleSpinBox(this);
        spinBox-&gt;setValue( i + 1 );
        myTable-&gt;setCellWidget( i, 1, spinBox );
      }
  }
  </code></pre>
  
  <p><code>myTable</code> is declared as a member of <code>MainWindow</code>.</p>
  
  <p>Normally, values of just <code>SpinBoxes</code> are accessed via: </p>
  
  <pre><code>ui-&gt;spinBox-&gt;value();
  </code></pre>
  
  <p>But this is not working here.</p>
  
  <p>How do I access the values of <code>SpinBoxes</code> use them as items in a <code>QTableWidget</code>? 
  I want to access the <code>SpinBoxes</code> by an iteration, hence using a for loop for looping through all Spin Boxes.  </p>