Recent Qt Creator: scanf still doesn't work
-
I am a teacher educating C/C++. For this we use Qt Creator under Windows (with mingw). We mostly deal with console projects (c and c++, without qt). There is one reason we still stick to an old version 5.11.1 of Qt Creator. In newer versions, as a default, the scanf command does not work. It doesn't wait for the input, it just falls through. The problem is that stdin and stdout are routed to the integrated output window. Only if you check a rather buried option "run in terminal", then it works. The problem is that you have to do this for each project and for each student. It was much better in old versions where it opened a new terminal by default.
As I have tried the most recent stable version today, and the problem still remains: Is there a solution to this problem that works globally (e.g. a config file)?Best regards
Johannes -
@sw_johannes Have you tried unchecking Edit > Preferences > Terminal > "Use internal terminal"?
That should always open an external terminal window whenever running a console application.
And if you have a minimal example that does not work with the internal terminal (from you description, it sounds like that) I would also suggest to report the problem to bugreports.qt.io (and please provide a link to the report here, thanks).
-
@sw_johannes Did you try adding
CONFIG += cmdline
to your .pro file? -
@aha_1980 Thanks very much, that indeed was it. I didn't see the Terminal option, because you have to scroll down for it to appear.
-
A aha_1980 has marked this topic as solved on