Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Just installed Qt 6.8 and no terminal window when running program
Forum Updated to NodeBB v4.3 + New Features

Just installed Qt 6.8 and no terminal window when running program

Scheduled Pinned Locked Moved Solved Installation and Deployment
8 Posts 3 Posters 426 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Madzi
    wrote on 16 Dec 2024, 18:40 last edited by Madzi
    #1

    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
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Dec 2024, 18:42 last edited by
      #2

      Hi and welcome to devnet,

      Which OS are you on ?
      Which version of Qt Creator are you using ?
      Are you using qmake or cmake ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 16 Dec 2024, 18:51
      0
      • S SGaist
        16 Dec 2024, 18:42

        Hi and welcome to devnet,

        Which OS are you on ?
        Which version of Qt Creator are you using ?
        Are you using qmake or cmake ?

        M Offline
        M Offline
        Madzi
        wrote on 16 Dec 2024, 18:51 last edited by
        #3

        @SGaist

        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.

        J 1 Reply Last reply 16 Dec 2024, 19:03
        0
        • M Madzi
          16 Dec 2024, 18:51

          @SGaist

          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.

          J Offline
          J Offline
          JonB
          wrote on 16 Dec 2024, 19:03 last edited by
          #4

          @Madzi
          Are you doing the Run in terminal Per the first sentence in https://doc.qt.io/qtcreator/creator-reference-terminal-view.html ?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Madzi
            wrote on 16 Dec 2024, 19:21 last edited by
            #5

            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.

            J 1 Reply Last reply 16 Dec 2024, 20:04
            0
            • M Madzi
              16 Dec 2024, 19:21

              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.

              J Offline
              J Offline
              JonB
              wrote on 16 Dec 2024, 20:04 last edited by JonB
              #6

              @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.

              M 1 Reply Last reply 16 Dec 2024, 20:22
              0
              • J JonB
                16 Dec 2024, 20:04

                @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.

                M Offline
                M Offline
                Madzi
                wrote on 16 Dec 2024, 20:22 last edited by
                #7

                @JonB

                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.

                J 1 Reply Last reply 16 Dec 2024, 21:18
                1
                • M Madzi has marked this topic as solved on 16 Dec 2024, 20:25
                • M Madzi
                  16 Dec 2024, 20:22

                  @JonB

                  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.

                  J Offline
                  J Offline
                  JonB
                  wrote on 16 Dec 2024, 21:18 last edited by
                  #8

                  @Madzi
                  That sounds right. For UI projects you don't need to spawn a terminal, but for console ones you do. It's a per-project setting.

                  1 Reply Last reply
                  1

                  1/8

                  16 Dec 2024, 18:40

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved