Results 1 to 6 of 6

Thread: Is there any way to see printf when using VS2005 and Qt?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2007
    Location
    Rakovnik, Czech Republic
    Posts
    175
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    43
    Thanked 3 Times in 3 Posts

    Default Re: Is there any way to see printf when using VS2005 and Qt?

    I do the following:

    1. add this to my .pro file

    Qt Code:
    1. CONFIG += console
    To copy to clipboard, switch view to plain text mode 

    after re-compiling your code, the app should open with a DOS console


    2. use qDebug to send output to console

    Qt Code:
    1. qDebug("show index: %d", myIndexVal);
    2.  
    3. // or
    4.  
    5. qDebug() << "show index: " << myIndexVal;
    To copy to clipboard, switch view to plain text mode 

    Using the latter option: I think you have to #include <QDebug> (not sure, i rarely use it).

  2. The following user says thank you to vonCZ for this useful post:

    ricardo (26th April 2009)

Similar Threads

  1. Problem building qt embedded for WinCE and VS2005
    By high_flyer in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 5th June 2009, 01:04
  2. Replies: 5
    Last Post: 19th September 2008, 15:24
  3. WCHAR to QString giving error in vs2005
    By ucomesdag in forum Qt Programming
    Replies: 2
    Last Post: 1st May 2008, 23:25
  4. Qt toolbar for VS2005
    By fruzzo in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd December 2007, 20:25
  5. Installing Qt 4.1.4 (open source) on windows with vs2005
    By Randulf in forum Installation and Deployment
    Replies: 1
    Last Post: 19th August 2006, 12:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.