Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. listButton = new QList<QPushButton*>;
  2.  
  3. //some code here
  4.  
  5. QPushButton *button = new QPushButton(QString::number(1),ui->widget);
  6. button->setGeometry(50, 50, 30, 30);
  7. button->setStyleSheet("background-color:red;");
  8. QObject::connect(button, SIGNAL(clicked()), this, SLOT(selectP()));
  9. listeButton->append(button);
  10.  
  11. //some code here
  12.  
  13. void selectP()
  14. {
  15. //I'd like to print here, coordinates of the button which has called "selectP()"
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement