Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. console application - no output
Forum Updated to NodeBB v4.3 + New Features

console application - no output

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 530 Views 3 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    I have followed the process and build console application. Enabled "terminal " in "options"...
    Now the application opens (Linux) "terminal" - takes keyboard OK, but there is no output response...
    What did I missed ?

    Axel SpoerlA 1 Reply Last reply
    0
    • A Anonymous_Banned275

      I have followed the process and build console application. Enabled "terminal " in "options"...
      Now the application opens (Linux) "terminal" - takes keyboard OK, but there is no output response...
      What did I missed ?

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @AnneRanch
      Can you post your application’s code, especially the parts where it generates output?

      Software Engineer
      The Qt Company, Oslo

      A 1 Reply Last reply
      0
      • Axel SpoerlA Axel Spoerl

        @AnneRanch
        Can you post your application’s code, especially the parts where it generates output?

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @Axel-Spoerl

        I have on;y this

        #include <QCoreApplication>
        #include <iostream>

        using namespace std;

        int main(int argc, char *argv[])
        {
        QCoreApplication a(argc, argv);

        return a.exec();
        

        }

        ...I must be missing something....

        Axel SpoerlA 1 Reply Last reply
        0
        • A Anonymous_Banned275

          @Axel-Spoerl

          I have on;y this

          #include <QCoreApplication>
          #include <iostream>

          using namespace std;

          int main(int argc, char *argv[])
          {
          QCoreApplication a(argc, argv);

          return a.exec();
          

          }

          ...I must be missing something....

          Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #4

          @AnneRanch said in console application - no output:

          ...I must be missing something....

          Yes. This application doesn’t produce any output. That’s why there is no output.

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          4
          • Ronel_qtmasterR Offline
            Ronel_qtmasterR Offline
            Ronel_qtmaster
            wrote on last edited by
            #5

            @AnneRanch before return line type:

            cout<<"Hello world"<<endl;

            A 1 Reply Last reply
            0
            • Ronel_qtmasterR Ronel_qtmaster

              @AnneRanch before return line type:

              cout<<"Hello world"<<endl;

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @Ronel_qtmaster OK - that will post the message, but that is not what I need. Assuming I am actually running Linux "terminal" I expect to act is as "terminal". If i type "sudo lsusb" I expect prompt for password.... as a reply '.

              Pl45m4P 1 Reply Last reply
              0
              • A Anonymous_Banned275

                @Ronel_qtmaster OK - that will post the message, but that is not what I need. Assuming I am actually running Linux "terminal" I expect to act is as "terminal". If i type "sudo lsusb" I expect prompt for password.... as a reply '.

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by
                #7

                @AnneRanch

                So you want your Qt app to be able to handle any input like a terminal?! WHY?! it does not make any sense unless you really write your own terminal app.

                If you want to pass command line arguments to your program, check QCommandLineParser

                • https://doc.qt.io/qt-6/qcommandlineparser.html

                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                1 Reply Last reply
                1

                • Login

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