title: Qt, PushButton, id attribute? Any way to know which button was clicked
body: <pre><code>void MainWindow::addRadioToUI()
  {       int button_cunter=4;
          while(!database.isEmpty())
          {       button_cunter++;
  
                  QPushButton *one = new QPushButton("Play: "+name(get_r.getTrackId()));
                  one-&gt;setIcon(QIcon(":/images/play_button.png"));
                  one-&gt;setMaximumWidth(140);
                  one-&gt;setFlat(true);
  
                  QGroupBox* get_rGB = new QGroupBox("somethink"); 
                  QFormLayout* layout = new QFormLayout; 
                  if(button_cunter%5 == 0){
                      layout-&gt;addWidget(one);
  
                  }
  
                  get_rGB-&gt;setLayout(layout);
                  scrollAreaWidgetContents-&gt;layout()-&gt;addWidget(get_rGB);
  
          }
  }
  </code></pre>
  
  <p>I have a few QPushButtons which are added automaticlly.
  Is there a way to add "id attribute or sth else" to button and next know which button was clicked? I have different action for each button.</p>