Console input with Qt Creator

前端 未结 6 1121
执笔经年
执笔经年 2020-12-03 00:54

I\'m developping a very simple app on my Mac using QtCreator.

It\'s a console application and I want the user to enter its name, and then I display his name. Here is

6条回答
  •  再見小時候
    2020-12-03 01:44

    Solution for Windows.

    In the .pro file add:

    QT -= core gui
    TEMPLATE = app
    CONFIG += console
    

    Go to Project -> Run settings, and make sure "Run in Terminal" is checked.

提交回复
热议问题