title: How to set a QSpinBox when QLabel get a QImage in Qt?
body: <p>I have <code>QSpinBox</code> in my <code>QWidget</code> which I want to set only when a <code>QLabel</code> get an <code>QImage</code>. Are there any function or tool by which I can set a <code>QSpinBox</code> at any condition?</p>
  
  <p>Here, how I have worked is given below</p>
  
  <p>At first, I declare a <code>QSpinBox</code> object and set it's maximum</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);        
  }
  </code></pre>
  
  <p>I have a <code>QPushButton</code> by pressing which, user can load an image, which will be displayed in <code>QLabel</code>.</p>
  
  <pre><code>void MainWindow::on_Browse_clicked()
  {
      QFileDialog dialog(this);
      dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"));
      dialog.setViewMode(QFileDialog::Detail);
      QString imagefileName = QFileDialog::getOpenFileName(this, tr("Open File"), "Given_Path", tr("Images (*.png *.xpm *.jpg)"));
  
      if(!imagefileName.isEmpty())
      {
          image= QImage(imagefileName);
          ui-&gt;label-&gt;setPixmap(QPixmap::fromImage(image));  
  
          spinbox= new QSpinBox(this); 
          QPoint p(100,300);
          spinbox-&gt;move(p);     
      }   
  }
  </code></pre>
  
  <p>But it is not displaying any <code>QSpinBox</code> how I tried to get.</p>
  
  <p>I would appreciate your any kind of help.</p>