Qt World Summit: Register Today!

Won't run in terminal

  • Dear reader,

    I am new to Qt on Mac. Just bought a Mac Quad Core 27" and <3 it lol...
    Anyways, im used to Microsoft C++ Professional 2011. When I make a simple script for example

    cout << "test";

    And I would click "run" it would open up in a console and show me what I did (or the cin commands used or what so ever).
    In Qt on Mac it does not.

    Is there anyone in here who has experience with Qt on Mac and that can help me out on how to configure it to run in a terminal, the proper way?... I got it working but it shows a lot of crap instead of only my program... lol

    Yours sincerely,


  • Seems to be a funny issue, if you're LOLing that much.

    Anyways, if you create an application bundle (the default on the mac), you will end up in stdout and stderror being catched an redirected to some standard loggin mechanism.

    You can start the application from the console like this:


    It then starts from the command line and you can see all output to stdout and stderr.

    For debugging purposes, you should consider using [[Doc:QDebug]] and redirect the output to some text browser as described in the wiki article "Browser for QDebug Log Output":http://developer.qt.nokia.com/wiki/Browser_for_QDebug_output.

  • Thank you very much for your reply Volker, this did fix the issue for me!

Log in to reply