Guest User

C++ is stupid; or am I?

a guest
Aug 5th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. //to nie działa:
  2. void QDialog::on_pushButton_clicked()
  3. {
  4.         if (ui->radioButton->isChecked()) {
  5.             ptr->sth = sth;
  6.         }
  7.  
  8. //to działa:
  9. void QDialog::on_pushButton_clicked()
  10. {
  11.         if (findChild<QRadioButton*>("radioButton")->isChecked()) {
  12.             ptr->sth = sth;
  13.         }
  14.  
  15. //i o dziwo... działa też to:
  16. void QDialog::on_pushButton_clicked()
  17. {
  18.     qDebug() << ui->radioButton;
  19.         if (ui->radioButton->isChecked()) {
  20.             ptr->sth = sth;
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment