Hi, I am new to Qt Tools. Right now I am just working in non QT projects and trying out qt features as an IDE. SO basically the output in external Terminal does not wait for the command "Press <RETURN> to exit the window", rather it immediately closes. It used to work some time ago but now suddenly it doesn't and I have already tried several things such as the /K "%{CurrentRun:Executable:FilePath}" argument for shell in terminal but to no avail. I even reinstalled QT Creator but it didn't help at all.
Using system.pause works, as well as QTextStream in(stdin); in.readLine(); also works but I don't understand how this internal Qt feature for pausing the terminal for output suddenly is now not working, as now it is impossible to check output with the terminal instantly closing by itself.
my pro file:
TEMPLATE = app
CONFIG += console c++17
CONFIG -= app_bundle
QT += core
SOURCES +=
main.cpp
and the main code:
#include <QCoreApplication>
#include <QTextStream>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
QCoreApplication app(argc, argv);
cout << "Hello World!" << endl;
cout << "What's up?" << endl;
int a;
cout << "Enter a number: ";
cin >> a;
cout << "Your number - " << a << endl;
// QTextStream in(stdin);
// in.readLine();
// system("pause");
return 0;
}