Results 1 to 9 of 9

Thread: Can i set resultLinEdit->text() from outside class ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Feb 2008
    Posts
    74
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Lightbulb Re: Can i set resultLinEdit->text() from outside class ?

    Hello! Jpn Sir,
    Thanks Sir for suggesting me that tool but i think it will print the debug information whereas i want to print the cout's in my file to logwindow.
    Also I searched the forum from where i got to see from here that i can use qdebug.h or qdebugstream.h headers to do the needful.

    In this post Wysota Sir has mentioned
    {Alternatively make your own streaming class that inherits std:: ostream and outputs everything using qDebug or some completely different mechanism. Then undefine cout and substitute it with your own.} So how do i do that? Do i have to use qdebugstream.h and implement my code or something else?

    Also if those headers are used am confused about few things like with: -

    QDebugStream cout(std::cout, QTextEdit* text_edit);
    QDebugStream cerr(std::cerr,QTextEdit* text_edit);

    Will it print all the cout's & cerr's to text_edit, i mean as in my case will it print cout<<"We have started Calculation"( written in my Square.cpp which is subclassed to Sample.cpp) to logTextEdit in my GUI?

    Also will it print to textedit widget added to my GUI or to a separate QTextEdit widget like a popup or QMessageBox or something likethat?

    Thanks again.
    Last edited by Krish; 18th March 2008 at 15:31.

Similar Threads

  1. How to use Signal through direct connection
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2007, 07:07
  2. Connecting to a base class signal?
    By AaronMK in forum Qt Programming
    Replies: 4
    Last Post: 26th October 2007, 22:37
  3. Creating object of other class in Run() method
    By santosh.kumar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2007, 15:05
  4. Replies: 2
    Last Post: 16th March 2007, 09:04
  5. Replies: 2
    Last Post: 4th May 2006, 19:17

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.