And in order not to post next thread, if I have a bool function, can I call return false; in few if() ? I mean:
Qt Code:
  1. if (beaufortBox->isChecked() && beaufortBox_2->isChecked())
  2. {
  3. int ret = QMessageBox::Information(this, tr("Speed Units Converter"),
  4. tr("You can't convert value to the same unit"),
  5. QMessageBox::Ok | QMessageBox::Default);
  6. return false;
  7. }
  8.  
  9. if (beaufortBox_2->isChecked() && beaufortBox_3->isChecked())
  10. {
  11. int ret = QMessageBox::Information(this, tr("Speed Units Converter"),
  12. tr("You can't convert value to the same unit"),
  13. QMessageBox::Ok | QMessageBox::Default);
  14. return false;
  15. }
To copy to clipboard, switch view to plain text mode