Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MainWindow::on_pushButton_clicked()
- {
- srand(time(NULL));
- int a=rand()%100;
- int b=rand()%100;
- int d=rand()%200;
- int e=rand()%200;
- int c=(rand()%5);
- if (c>=4)
- {
- ui->pushButton->move(a,b);
- ui->pushButton_2->move(d,e);
- }
- else
- {
- ui->pushButton_2->move(400,400);
- ui->pushButton->move(a,b);
- }
- }
- void MainWindow::on_pushButton_2_clicked()
- {
- ui->label->move(100,100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement