简体   繁体   中英

Qt Creator doesn't open terminal

I install Qt Creator 3.5.1 and create project. In such case

#include <stdio.h>

int main(void)
{
    printf("Hello World! \n");
    return 0;
}

It works but Qt Creator doesn't open terminal and write down "Hello world" in "application output". When I modify code a little bit

int main(void)
{
    int num;
    scanf("%d", &num);
    printf("Hello World! %d\n", num);
    return 0;
 }

It doesn't work. "application output" say: Starting /home/project/pr1 .....

The terminal does not open. In settings I try to change the different terminals

/usr/bin/gnome-terminal -x

/usr/bin/x-terminal-emulator -e

/usr/bin/xterm -e

It does not help me.

Open Your Project in Qt and Follow the steps given in the picture, Your terminal should run. Check Run in terminal

This option can be edited in

  1. Tools
  2. Options
  3. Build and Run
  4. General
  5. Default for "run in terminal" = enabled

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM