How to output a single line in Qt Creator 2.4.1 ?

  • I'm using Qt Creator 2.4.1 based on Qt 4.7.4

    I've made a simple "Hello, world" program

    @int main()
    std::cout << "Hello World!" << std::endl;

    But when I run it, nothing appears in the Application output, how to enable it?

  • Moderators

    Either run in terminal (there is a checkbox in Projects pane) or use qDebug().

  • Where exactly this checkbox in the Project pane? right click?

  • In the left, you have a bar, go to "Project">>"Run Settings" and you will see a checkbox with a text "Run on Terminal"...

    I think is this.

  • I have added /Applications/Utilities/ to the Preferences -> Environment,

    in “Project”>>“Run Settings” the checkbox was already checked,

    now on the left side line "Launching" freezes for a long time with a grey color
    and 4 Terminal windows appear on the back screen. What is wrong?

  • Try right click on project and clean project, after this, do a qmake, rebuild and build, and try run application again. I never see this, can you send the complete code of your application?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.