Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Recent Qt Creator: scanf still doesn't work
Forum Updated to NodeBB v4.3 + New Features

Recent Qt Creator: scanf still doesn't work

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 652 Views
  • 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.
  • S Offline
    S Offline
    sw_johannes
    wrote on last edited by
    #1

    I am a teacher educating C/C++. For this we use Qt Creator under Windows (with mingw). We mostly deal with console projects (c and c++, without qt). There is one reason we still stick to an old version 5.11.1 of Qt Creator. In newer versions, as a default, the scanf command does not work. It doesn't wait for the input, it just falls through. The problem is that stdin and stdout are routed to the integrated output window. Only if you check a rather buried option "run in terminal", then it works. The problem is that you have to do this for each project and for each student. It was much better in old versions where it opened a new terminal by default.
    As I have tried the most recent stable version today, and the problem still remains: Is there a solution to this problem that works globally (e.g. a config file)?

    Best regards
    Johannes

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      What build system do you use? qmake or CMake?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      S 1 Reply Last reply
      0
      • VRoninV VRonin

        What build system do you use? qmake or CMake?

        S Offline
        S Offline
        sw_johannes
        wrote on last edited by
        #3

        @VRonin qmake

        VRoninV 1 Reply Last reply
        0
        • aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @sw_johannes Have you tried unchecking Edit > Preferences > Terminal > "Use internal terminal"?

          That should always open an external terminal window whenever running a console application.

          And if you have a minimal example that does not work with the internal terminal (from you description, it sounds like that) I would also suggest to report the problem to bugreports.qt.io (and please provide a link to the report here, thanks).

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • S sw_johannes

            @VRonin qmake

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            @sw_johannes Did you try adding CONFIG += cmdline to your .pro file?

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sw_johannes
              wrote on last edited by
              #6

              @aha_1980 Thanks very much, that indeed was it. I didn't see the Terminal option, because you have to scroll down for it to appear.

              1 Reply Last reply
              1
              • aha_1980A aha_1980 has marked this topic as solved on

              • Login

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