Results 1 to 4 of 4

Thread: print value

  1. #1
    Join Date
    Apr 2010
    Posts
    17
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default print value

    Hello,

    how can i do to print value of some variables somewhere to test them?

  2. #2
    Join Date
    Sep 2009
    Location
    Targu Mures, Romania
    Posts
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: print value

    Hello,

    You can use qDebug(), qWarning(), qCritical(), qFatal() global functions to display various informations.
    The information will be displayed on console.

    Example:

    Qt Code:
    1. qDebug()<<"Variable value is "<<yourVariable;
    To copy to clipboard, switch view to plain text mode 

    You can find more informations here:

    http://doc.qt.nokia.com/4.6/qdebug.html#details

    Regards,
    Jancsi

  3. The following user says thank you to csaken for this useful post:

    valy12 (21st April 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: print value

    Run your application in debug mode and set a breakpoint. Then you can see all your variables and their current values.

  5. The following user says thank you to Lykurg for this useful post:

    valy12 (21st April 2010)

  6. #4
    Join Date
    Apr 2010
    Posts
    17
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: print value

    Great! thanks

Similar Threads

  1. print preview
    By wbt_ph in forum Qt Programming
    Replies: 4
    Last Post: 1st August 2009, 06:41
  2. Cancelling Long-running Print/Print Preview
    By ChrisW67 in forum Newbie
    Replies: 4
    Last Post: 16th June 2009, 23:05
  3. How to print a QTableView
    By teikchuan in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2009, 08:05
  4. About print Dialog
    By Sheng in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2009, 15:52
  5. I can't print...
    By brevleq in forum Qt Programming
    Replies: 5
    Last Post: 22nd January 2008, 11:13

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.