include <iostream>#include "MainWindow.h"int main(int argc, char **argv){ bool gui = false;//здесь будет разбор параметров QApplication app(argc, argv); if (gui) { MainWindow window; window.show(); return app.exec(); } else { std::cout << "text"; return 0; }}
#include <iostream>#include "MainWindow.h"int main(int argc, char **argv){ bool gui = false; if (gui) { QApplication app(argc, argv); MainWindow window; window.show(); return app.exec(); } else { QCoreApplication app(argc, argv); std::cout << "text"; return 0; }}