Yesterday the Linux system collapsed and today the Linux system (Ubuntu16.04) was installed. After the QT creator was installed, a simple C + + project was created to test whether the installation was correct and the project defaults to output "Hello world." ", run through, normal output. But there was a warning in debug (though it could also output "Hello world". "): Debugging Starts &" warning:GDB:Failed to set controlling Terminal: ..... Search the internet has not found the right solution, but I am a compulsive disorder, the afternoon to search, look forward to the great God can give a solution. Finally, I saw someone ask this question on a foreign website, and there are some experts who have given the solution (but only in English), and now I write down the solution so that I can check it later.
In the following figure, locate the item in the QT left panel, run it, and then run the "Run in Terminal" under the heading on the right. This causes QT creator to start the program in xterm (default) that is used with GDB, and to make the "& warning:GDB:Failed to set controlling terminal" problem disappear. Which is to run your program at the terminal.
Also, by default, when you start the debugger, the Qt creator is placed in the foreground to hide the started terminal. To stop this behavior, you can go to: tools, options, debugger. In the overview (some versions are general) tab, uncheck the check boxes that refer to the front desk for Qt creator when an application is interrupted.
If you want to change the terminal, you can open the option to the environment. Terminal changes under System. For the Ubuntu/gnome terminal of this machine, set it to/usr/bin/gnome-terminal-x. The parameters in this setting tell the terminal to execute an external command or program.
So far, the problem has been solved.