Yes, you are right, aamer4yu. Thank you

Now it works with the following code:

Qt Code:
  1. #include <QApplication>
  2. #include <QPushButton>
  3. #include <QMessageBox>
  4. #include <mainframe.h>
  5. #include "dialog_start.h"
  6. #include "OscillationGRN.h"
  7. #include <iostream>
  8.  
  9. int main(int argc, char **argv)
  10. {
  11.  
  12. QApplication app(argc, argv);
  13.  
  14. // first appears a popup, which will offer to the user 2 different kinds of problems
  15. QMessageBox msgBox;
  16. msgBox.setIcon(QMessageBox::Question);
  17. msgBox.setText("Which one of the optimization problems do you want to execute?");
  18. msgBox.setInformativeText("Make your choice by clicking on button.");
  19. QPushButton *OscillationButton = msgBox.addButton("Sustained Oscillation", QMessageBox::ActionRole);
  20. QPushButton *BenchmarkButton = msgBox.addButton("Constrained Problems",QMessageBox::NoRole);
  21.  
  22. msgBox.exec();
  23.  
  24. mainFrame mainWind; // build Main Window
  25.  
  26. dialogStart start(0, &mainWind); // build Initialization window
  27.  
  28. OscillationGRN evoGRN; // build OscillationGRN window
  29.  
  30. if(msgBox.clickedButton() == BenchmarkButton){ // if the user decide to cope with optimization of constrained benchmark problems
  31.  
  32. start.show(); // the mainWindow will be opened after the user click on START button within dialogStart
  33.  
  34. }
  35. else if(msgBox.clickedButton() == OscillationButton){ // if the user decide to cope with generation of oscillation by means of Gene Regulatory Networks
  36.  
  37. evoGRN.show();
  38.  
  39. }
  40. return app.exec();
  41.  
  42. exit(EXIT_SUCCESS);
  43.  
  44. }
To copy to clipboard, switch view to plain text mode