Hi. I've got some annoying errors which appear in my Dialog.cpp file:
Qt Code:
  1. #include <QtGui>
  2.  
  3. #include "Dialog.h"
  4.  
  5.  
  6.  
  7.  
  8. Dialog::Dialog(QWidget *parent)
  9. : QDialog(parent)
  10. {
  11. ui.setupUi(this);
  12.  
  13. fromLineEdit->hide();
  14. fromLabel->hide();
  15. whiteLabel->hide();
  16. toLabel->hide();
  17. convertButton->hide();
  18. exitButton_2->hide();
  19.  
  20.  
  21. connect(nextStepButton, SIGNAL(clicked()), this, SLOT(settingUp()));
  22.  
  23. }
  24.  
  25.  
  26.  
  27. bool Dialog::settingUp()
  28. {
  29. if (beaufortBox->isChecked() && beaufortBox_2->isChecked())
  30. {
  31. int ret = QMessageBox::information(this, tr("Speed Units Converter"),
  32. tr("You can't convert value to the same unit"),
  33. QMessageBox::Ok | QMessageBox::Default);
  34. if (ret == QMessageBox::Ok)
  35. {
  36. return false;
  37. }
  38.  
  39. }
  40.  
  41. // And few other which look almost the same
  42.  
  43.  
  44.  
  45. if (beaufortBox->isChecked() && knotBox_2->isChecked())
  46. {
  47. Dialog->setWindowTitle("Converting value from Beaufort to Knot");
  48. toLabel->setText("Knot(s)");
  49. fromLineEdit->hide();
  50. fromLabel->setVisible(bool);
  51. whiteLabel->setVisible(bool);
  52. toLabel->setVisible(bool);
  53. convertButton->setVisible(bool);
  54. exitButton_2->setVisible(bool);
  55. }
  56.  
  57. if (beaufortBox->isChecked() && mpsBox_2->isChecked())
  58. {
  59. Dialog->setWindowTitle("Converting value from Beaufort to Mps");
  60.  
  61. fromLabel->setVisible(bool);
  62. whiteLabel->setVisible(bool);
  63. toLabel->setVisible(bool);
  64. convertButton->setVisible(bool);
  65. exitButton_2->setVisible(bool);
  66. }
  67.  
  68. // And others which look almost the same
  69.  
  70.  
  71.  
  72.  
  73.  
  74. }
To copy to clipboard, switch view to plain text mode 

Errors are the same for each if instruction (exeptions are first if's which return false):
In member function bool Dialog::settingUp()
expected primary expression before "bool"
expected primary expression before -> token

I've got much this kind of errors, only the line which the error appears its different. When I was trying to do setVisible() instead of setVisible(bool) I reached errors that candidates are setVisible(bool) and a few others about setVisible()