Yes, you are right, aamer4yu. Thank you
Now it works with the following code:
#include <QApplication>
#include <QPushButton>
#include <QMessageBox>
#include <mainframe.h>
#include "dialog_start.h"
#include "OscillationGRN.h"
#include <iostream>
int main(int argc, char **argv)
{
// first appears a popup, which will offer to the user 2 different kinds of problems
msgBox.setText("Which one of the optimization problems do you want to execute?");
msgBox.setInformativeText("Make your choice by clicking on button.");
msgBox.exec();
mainFrame mainWind; // build Main Window
dialogStart start(0, &mainWind); // build Initialization window
OscillationGRN evoGRN; // build OscillationGRN window
if(msgBox.clickedButton() == BenchmarkButton){ // if the user decide to cope with optimization of constrained benchmark problems
start.show(); // the mainWindow will be opened after the user click on START button within dialogStart
}
else if(msgBox.clickedButton() == OscillationButton){ // if the user decide to cope with generation of oscillation by means of Gene Regulatory Networks
evoGRN.show();
}
return app.exec();
exit(EXIT_SUCCESS);
}
#include <QApplication>
#include <QPushButton>
#include <QMessageBox>
#include <mainframe.h>
#include "dialog_start.h"
#include "OscillationGRN.h"
#include <iostream>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
// first appears a popup, which will offer to the user 2 different kinds of problems
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Question);
msgBox.setText("Which one of the optimization problems do you want to execute?");
msgBox.setInformativeText("Make your choice by clicking on button.");
QPushButton *OscillationButton = msgBox.addButton("Sustained Oscillation", QMessageBox::ActionRole);
QPushButton *BenchmarkButton = msgBox.addButton("Constrained Problems",QMessageBox::NoRole);
msgBox.exec();
mainFrame mainWind; // build Main Window
dialogStart start(0, &mainWind); // build Initialization window
OscillationGRN evoGRN; // build OscillationGRN window
if(msgBox.clickedButton() == BenchmarkButton){ // if the user decide to cope with optimization of constrained benchmark problems
start.show(); // the mainWindow will be opened after the user click on START button within dialogStart
}
else if(msgBox.clickedButton() == OscillationButton){ // if the user decide to cope with generation of oscillation by means of Gene Regulatory Networks
evoGRN.show();
}
return app.exec();
exit(EXIT_SUCCESS);
}
To copy to clipboard, switch view to plain text mode
Bookmarks