title: How can I set default values to QDoubleSpinBox
body: <p>I am doing ballistic calculations for a projectile. 
  so in that I have a check box and based on check box I have to take the inputs
  i.e if check box is enabled then read values from double-spinbox and do ballistics calculations</p>
  
  <p>else go by the default values of the double spin box for that I have written this code but I end up the error in <code>setValue()</code>
  so for my requirement wt method should I  take. </p>
  
  <pre><code>if(ui-&gt;checkBox-&gt;isChecked())
  {
      //if it is checked then take the values given on UI
  
      altitude= ui-doubleSpinBox_1&gt;text();
      b_pressure= ui-doubleSpinBox_2&gt;text();
      r_humidity= ui-doubleSpinBox_3&gt;text();
      temp=  ui-doubleSpinBox_4&gt;text();
  }
  else
  {
      ///else take the default values
  
      altitude=ui-doubleSpinBox_1&gt;setValue(0);
      b_pressure=ui-doubleSpinBox_2&gt;setValue(29.53);
      r_humidity=ui-doubleSpinBox_3&gt;setValue(0.78);
      temp=ui-doubleSpinBox_4&gt;setValue(78);
  }
  </code></pre>