Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- listButton = new QList<QPushButton*>;
- //some code here
- QPushButton *button = new QPushButton(QString::number(1),ui->widget);
- button->setGeometry(50, 50, 30, 30);
- button->setStyleSheet("background-color:red;");
- QObject::connect(button, SIGNAL(clicked()), this, SLOT(selectP()));
- listeButton->append(button);
- //some code here
- void selectP()
- {
- //I'd like to print here, coordinates of the button which has called "selectP()"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement