Results 1 to 13 of 13

Thread: How to redirect printf to QTextEdit?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2013
    Posts
    102
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default How to redirect printf to QTextEdit?

    Hi guys, I'm developing a desktop gui app which uses an open source library. The library uses a lot of "printf" statements, which are not seen on my app gui. So I thought of redirecting the printf to a QTextEdit on my app, but don't know how to do it. Till now I found a post on redirection of std::cout to a QTextEdit (http://stackoverflow.com/questions/1...to-a-qtextedit) which works ok, but I'd like to make something similar for "printf". Do you know how to do it (s short sample code would be perfect)? Is it possible at all? If not, what are the alternatives? Much thanks in advance.
    Last edited by arcull; 7th November 2013 at 11:14.

Similar Threads

  1. Redirect key strokes
    By iPick12 in forum Qt Programming
    Replies: 1
    Last Post: 11th September 2012, 17:55
  2. How to redirect to a URL in Qt
    By xyz in forum Newbie
    Replies: 8
    Last Post: 30th March 2012, 08:39
  3. redirect qDebug() to file
    By sriky27 in forum Qt Programming
    Replies: 9
    Last Post: 17th March 2009, 21:21
  4. Replies: 4
    Last Post: 27th March 2008, 10:21
  5. Redirect printf to QTextEdit?
    By Randulf in forum Qt Programming
    Replies: 9
    Last Post: 12th October 2006, 15:57

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.