Just installed Qt 6.8 and no terminal window when running program
-
wrote on 16 Dec 2024, 18:40 last edited by Madzi
Hi guys
Debian Bookworm
I installed Qt 6.8 and am now trying to run a simple console program
#include <QCoreApplication> #include <iostream> #include <string> void do_cpp(){ std::string name; std::cout << "Enter your name: "; std::cin >> name; std::cout << "Hello " << name << "\n"; } int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // something somethin do_cpp(); return a.exec(); } ```. The program builds but there is no console window. There is output from the first cout in the application output window but no other output after entering a name. I have unchecked 'use internal terminal' and also tried the different terminal options under 'Preferences->Environment->System' all to no avail. any help would be greatly appreciated
-
Hi and welcome to devnet,
Which OS are you on ?
Which version of Qt Creator are you using ?
Are you using qmake or cmake ? -
Hi and welcome to devnet,
Which OS are you on ?
Which version of Qt Creator are you using ?
Are you using qmake or cmake ? -
Hi
I'm using debian bookworm, qtcreator 15.0.0 and I am not to sure if using qmake or cmake but there are cmake configuration files within the project folder.
wrote on 16 Dec 2024, 19:03 last edited by@Madzi
Are you doing the Run in terminal Per the first sentence in https://doc.qt.io/qtcreator/creator-reference-terminal-view.html ? -
wrote on 16 Dec 2024, 19:21 last edited by
I have 'Preferences->Terminal->Use internal terminal' unchecked. I have tried both checked and unchecked with the same result.
for 'Preferences->Environment->System', i am using /usr/bin/xterm -e. I have tried the us/bin/x-terminal-emulator and /usr/bin/konsole options as well. -
I have 'Preferences->Terminal->Use internal terminal' unchecked. I have tried both checked and unchecked with the same result.
for 'Preferences->Environment->System', i am using /usr/bin/xterm -e. I have tried the us/bin/x-terminal-emulator and /usr/bin/konsole options as well.wrote on 16 Dec 2024, 20:04 last edited by JonB@Madzi
Neither of those is my question or what it says in the first sentence of that link.When you select the Run in Terminal check box and run an application or the Open Terminal button to open a terminal, it opens as an output view.
The two things you refer to are options. You need to be running a terminal before they are relevant.
-
@Madzi
Neither of those is my question or what it says in the first sentence of that link.When you select the Run in Terminal check box and run an application or the Open Terminal button to open a terminal, it opens as an output view.
The two things you refer to are options. You need to be running a terminal before they are relevant.
-
-
you will have to excuse me mate, I'm all a bit new to this. Had to do some digging around but finally found the damn thing in the projects tab under run settings. Working like a charm now.
Thank you so very much.
1/8