Results 1 to 4 of 4

Thread: qDebug style string insertion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 3 Times in 3 Posts

    Default qDebug style string insertion

    hello,

    I want to know how to do qDebug style string insertions. For instance I can go:
    Qt Code:
    1. qDebug("%s is %d today", myName, myAge);
    To copy to clipboard, switch view to plain text mode 

    Python has a similar feature:
    Qt Code:
    1. >>> '%s is %d today' % (myName, myAge)
    To copy to clipboard, switch view to plain text mode 

    It would be helpful if I could do these style of manipulations in my Qt C++ program. Is there a proper way to do this, or do I have to hack the string around to inject my content.

    thanks,
    Richard
    Last edited by rbp; 17th March 2009 at 07:36.

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.