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 get QT creator to take input from the keyboard
Forum Update on Monday, May 27th 2025

How to get QT creator to take input from the keyboard

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 719 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
    StudentGuy2544
    wrote on 26 Apr 2022, 20:54 last edited by
    #1

    I started a new console application project and wrote a simple program to receive and then display a number and it works flawlessly on Xcode when i run it there. But on QT creator, it always skips "cin >>" and outputs my "cout <<" statements. I tried getting it to "Run in terminal" but when i do that, and press run, it only shows the time when i pressed run and it says "Starting projectname"

    By the way, I included #include <QTextStream> and #include <QDebug>

    J S 2 Replies Last reply 27 Apr 2022, 06:45
    0
    • M Offline
      M Offline
      mzimmers
      wrote on 26 Apr 2022, 20:58 last edited by
      #2

      Can you post some relevant code? Also, have you tried running the app outside of Creator?

      1 Reply Last reply
      0
      • S StudentGuy2544
        26 Apr 2022, 20:54

        I started a new console application project and wrote a simple program to receive and then display a number and it works flawlessly on Xcode when i run it there. But on QT creator, it always skips "cin >>" and outputs my "cout <<" statements. I tried getting it to "Run in terminal" but when i do that, and press run, it only shows the time when i pressed run and it says "Starting projectname"

        By the way, I included #include <QTextStream> and #include <QDebug>

        J Offline
        J Offline
        JonB
        wrote on 27 Apr 2022, 06:45 last edited by JonB
        #3

        @StudentGuy2544
        Hello and welcome.

        When running inside Qt Creator, the "Output/Console window pane" is indeed only for showing you output from your application. It does not accept input.

        You do indeed need to have the "Run in terminal" option enabled to get a terminal window for a console application where you can provide input as well as see output. It should be working, but you say not. I am not a Mac user, but I believe I may have seen recent posts stating this does not work under Mac Creator in certain versions? You might try searching the forum posts. Otherwise I think you should state your Mac version and your Qt Creator version, someone else may know.

        1 Reply Last reply
        1
        • S StudentGuy2544
          26 Apr 2022, 20:54

          I started a new console application project and wrote a simple program to receive and then display a number and it works flawlessly on Xcode when i run it there. But on QT creator, it always skips "cin >>" and outputs my "cout <<" statements. I tried getting it to "Run in terminal" but when i do that, and press run, it only shows the time when i pressed run and it says "Starting projectname"

          By the way, I included #include <QTextStream> and #include <QDebug>

          S Offline
          S Offline
          SimonSchroeder
          wrote on 28 Apr 2022, 06:47 last edited by
          #4

          @StudentGuy2544 Are you using an M1 Mac?

          1 Reply Last reply
          0

          1/4

          26 Apr 2022, 20:54

          • Login

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