How to get QT creator to take input from the keyboard
-
I started a new console application project and wrote a simple program to receive and then display a number and it works flawlessly on Xcode when i run it there. But on QT creator, it always skips "cin >>" and outputs my "cout <<" statements. I tried getting it to "Run in terminal" but when i do that, and press run, it only shows the time when i pressed run and it says "Starting projectname"
By the way, I included #include <QTextStream> and #include <QDebug>
-
@StudentGuy2544
Hello and welcome.When running inside Qt Creator, the "Output/Console window pane" is indeed only for showing you output from your application. It does not accept input.
You do indeed need to have the "Run in terminal" option enabled to get a terminal window for a console application where you can provide input as well as see output. It should be working, but you say not. I am not a Mac user, but I believe I may have seen recent posts stating this does not work under Mac Creator in certain versions? You might try searching the forum posts. Otherwise I think you should state your Mac version and your Qt Creator version, someone else may know.
-
@StudentGuy2544 Are you using an M1 Mac?