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. How to use the new QtCreator for console input/output?
Forum Updated to NodeBB v4.3 + New Features

How to use the new QtCreator for console input/output?

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 5 Posters 22.3k 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.
  • K Offline
    K Offline
    Koljasha
    wrote on 15 Dec 2016, 11:50 last edited by Koljasha
    #1

    Hello!

    Sorry for my english, I am using a translator!

    Today updated Qt. Now Qt 5.7.1, QtCreator 4.2
    I can not understand how to use it is now :-)

    A simple console application in pure C++.
    Previously, when I run the application appeared a separate console. In it I had stdin (cin >>) and stdout (cout <<).
    Now stdout is written directly into QtCreator box below. And how to use stdin I can not understand (((

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 15 Dec 2016, 12:13 last edited by mrjj
      #2

      Hi
      Can you try this ?
      alt text

      Click "Run in terminal" to ON

      K 1 Reply Last reply 15 Dec 2016, 12:24
      2
      • M mrjj
        15 Dec 2016, 12:13

        Hi
        Can you try this ?
        alt text

        Click "Run in terminal" to ON

        K Offline
        K Offline
        Koljasha
        wrote on 15 Dec 2016, 12:24 last edited by
        #3

        @mrjj Great thank you!!!!
        In the new version a bit redesigned, but the problem is solved in this way !!!

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 15 Dec 2016, 12:26 last edited by mrjj
          #4

          Hi
          Yes there are many new things :)

          Also note if using on win 10, there is new flat look to match win 10.

          alt text

          "Sorry for my english, I am using a translator!"
          Seems to work pretty well :)

          K 1 Reply Last reply 15 Dec 2016, 12:39
          2
          • M mrjj
            15 Dec 2016, 12:26

            Hi
            Yes there are many new things :)

            Also note if using on win 10, there is new flat look to match win 10.

            alt text

            "Sorry for my english, I am using a translator!"
            Seems to work pretty well :)

            K Offline
            K Offline
            Koljasha
            wrote on 15 Dec 2016, 12:39 last edited by
            #5

            @mrjj I use Ubuntu :-)
            and about "Run in terminal" - maybe it's a bug in my.
            "Run in terminal" enabled by default, but it does not work. I have to turn off / on and then works properly. In previous versions, this was not ...

            M 1 Reply Last reply 15 Dec 2016, 12:40
            0
            • K Koljasha
              15 Dec 2016, 12:39

              @mrjj I use Ubuntu :-)
              and about "Run in terminal" - maybe it's a bug in my.
              "Run in terminal" enabled by default, but it does not work. I have to turn off / on and then works properly. In previous versions, this was not ...

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 15 Dec 2016, 12:40 last edited by
              #6

              @Koljasha
              Heh ok then flat win 10 style is pretty not exciting :)

              Hmm that is a bit odd.

              What was the version you upgraded from ?

              K 2 Replies Last reply 15 Dec 2016, 12:45
              0
              • M mrjj
                15 Dec 2016, 12:40

                @Koljasha
                Heh ok then flat win 10 style is pretty not exciting :)

                Hmm that is a bit odd.

                What was the version you upgraded from ?

                K Offline
                K Offline
                Koljasha
                wrote on 15 Dec 2016, 12:45 last edited by
                #7

                @mrjj today I download Qt 5.7.1 for Linux 64-bit (729 MB)
                It's free install. Now Qt 5.7.1, QtCreator 4.2
                Earlier was 5.7.0

                1 Reply Last reply
                0
                • M mrjj
                  15 Dec 2016, 12:40

                  @Koljasha
                  Heh ok then flat win 10 style is pretty not exciting :)

                  Hmm that is a bit odd.

                  What was the version you upgraded from ?

                  K Offline
                  K Offline
                  Koljasha
                  wrote on 15 Dec 2016, 12:47 last edited by
                  #8

                  @mrjj I used to so never encountered ...
                  and today was puzzled :-)

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on 15 Dec 2016, 12:47 last edited by
                    #9

                    Oh
                    So it changed between 5.7.0 and 5.7.1 ?

                    K 1 Reply Last reply 15 Dec 2016, 12:48
                    0
                    • M mrjj
                      15 Dec 2016, 12:47

                      Oh
                      So it changed between 5.7.0 and 5.7.1 ?

                      K Offline
                      K Offline
                      Koljasha
                      wrote on 15 Dec 2016, 12:48 last edited by Koljasha
                      #10

                      @mrjj yes!
                      maybe it's just me ...

                      M 1 Reply Last reply 15 Dec 2016, 12:59
                      0
                      • K Koljasha
                        15 Dec 2016, 12:48

                        @mrjj yes!
                        maybe it's just me ...

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 15 Dec 2016, 12:59 last edited by
                        #11

                        @Koljasha
                        Maybe the .user file was damaged
                        and the setting did not really work.
                        Before you reset it.

                        K 1 Reply Last reply 15 Dec 2016, 13:08
                        0
                        • M mrjj
                          15 Dec 2016, 12:59

                          @Koljasha
                          Maybe the .user file was damaged
                          and the setting did not really work.
                          Before you reset it.

                          K Offline
                          K Offline
                          Koljasha
                          wrote on 15 Dec 2016, 13:08 last edited by
                          #12

                          @mrjj I specifically removed ~/.config/QtProject
                          still must disable/enable "Run in terminal"
                          work at least now there is a solution on the forum :-)

                          M 1 Reply Last reply 15 Dec 2016, 13:13
                          0
                          • K Koljasha
                            15 Dec 2016, 13:08

                            @mrjj I specifically removed ~/.config/QtProject
                            still must disable/enable "Run in terminal"
                            work at least now there is a solution on the forum :-)

                            M Offline
                            M Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on 15 Dec 2016, 13:13 last edited by
                            #13

                            @Koljasha
                            Hi
                            in the project folder
                            there is a .user file
                            same name as the .pro
                            Did u try delete that?
                            (not sure it does anything. just to check)

                            K 1 Reply Last reply 15 Dec 2016, 13:20
                            0
                            • M mrjj
                              15 Dec 2016, 13:13

                              @Koljasha
                              Hi
                              in the project folder
                              there is a .user file
                              same name as the .pro
                              Did u try delete that?
                              (not sure it does anything. just to check)

                              K Offline
                              K Offline
                              Koljasha
                              wrote on 15 Dec 2016, 13:20 last edited by
                              #14

                              @mrjj No...
                              It is not work. I delete .user file....
                              It's something in new Qt ot QtCreator.... and maybe only in Linux...
                              Tomorrow I will try to install on Windows, and then write ...

                              M 1 Reply Last reply 15 Dec 2016, 13:22
                              1
                              • K Koljasha
                                15 Dec 2016, 13:20

                                @mrjj No...
                                It is not work. I delete .user file....
                                It's something in new Qt ot QtCreator.... and maybe only in Linux...
                                Tomorrow I will try to install on Windows, and then write ...

                                M Offline
                                M Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on 15 Dec 2016, 13:22 last edited by
                                #15

                                @Koljasha
                                Yes it could be as its different on win / linux with the "console"
                                Good test :)

                                K 1 Reply Last reply 16 Dec 2016, 08:30
                                0
                                • M mrjj
                                  15 Dec 2016, 13:22

                                  @Koljasha
                                  Yes it could be as its different on win / linux with the "console"
                                  Good test :)

                                  K Offline
                                  K Offline
                                  Koljasha
                                  wrote on 16 Dec 2016, 08:30 last edited by
                                  #16

                                  @mrjj Hello!
                                  I try on two my PC with Windows 10 (home and work). And everywhere I must recheck (turn off/on) "Run in terminal". It's bug in new version.

                                  M 1 Reply Last reply 16 Dec 2016, 08:43
                                  1
                                  • K Koljasha
                                    16 Dec 2016, 08:30

                                    @mrjj Hello!
                                    I try on two my PC with Windows 10 (home and work). And everywhere I must recheck (turn off/on) "Run in terminal". It's bug in new version.

                                    M Offline
                                    M Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on 16 Dec 2016, 08:43 last edited by
                                    #17

                                    @Koljasha
                                    Ok. let me see if i get bug when upgrading. :)

                                    K R 2 Replies Last reply 16 Dec 2016, 08:58
                                    0
                                    • M mrjj
                                      16 Dec 2016, 08:43

                                      @Koljasha
                                      Ok. let me see if i get bug when upgrading. :)

                                      K Offline
                                      K Offline
                                      Koljasha
                                      wrote on 16 Dec 2016, 08:58 last edited by
                                      #18

                                      @mrjj OK.
                                      It is very interesting. I use clean installation on Ubuntu and Windows.
                                      And for exemple free C++ project and free Qt console project.
                                      In C++: cout << "Hello" << endl;
                                      In Qt: qDebug() << "Hello";

                                      Swati777999S 1 Reply Last reply 29 Oct 2021, 01:46
                                      0
                                      • M mrjj
                                        16 Dec 2016, 08:43

                                        @Koljasha
                                        Ok. let me see if i get bug when upgrading. :)

                                        R Offline
                                        R Offline
                                        raymanT
                                        wrote on 23 Dec 2016, 08:39 last edited by
                                        #19

                                        @mrjj hi I have the same problem, too
                                        It seems that qt creator didn't write the "run in terminal" option
                                        <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
                                        in the pro.user file after the project created by the wizard

                                        the "UseTerminal" line above will be writed into the pro.user file only if I manually uncheck and check this option in the project setting .

                                        I tried to find a config file of Qt4Project in the qtcreator to correct its behavior but failed,.
                                        Could you please give me some advice to fix this problem?
                                        Thanks in advance.

                                        M 1 Reply Last reply 23 Dec 2016, 08:45
                                        0
                                        • R raymanT
                                          23 Dec 2016, 08:39

                                          @mrjj hi I have the same problem, too
                                          It seems that qt creator didn't write the "run in terminal" option
                                          <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
                                          in the pro.user file after the project created by the wizard

                                          the "UseTerminal" line above will be writed into the pro.user file only if I manually uncheck and check this option in the project setting .

                                          I tried to find a config file of Qt4Project in the qtcreator to correct its behavior but failed,.
                                          Could you please give me some advice to fix this problem?
                                          Thanks in advance.

                                          M Offline
                                          M Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on 23 Dec 2016, 08:45 last edited by
                                          #20

                                          @raymanT
                                          Does sounds the same. Flip flopping the settings makes it save it.
                                          I upgraded via maintenance tool but here the settings does seems to work.

                                          R 1 Reply Last reply 23 Dec 2016, 08:50
                                          0

                                          1/24

                                          15 Dec 2016, 11:50

                                          • Login

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