Results 1 to 7 of 7

Thread: where can I get qWarning () output

  1. #1
    Join Date
    Mar 2006
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Smile where can I get qWarning () output

    Hi all,

    I 'm using linux box, with Qt 3.

    When I used qWarning to print a warning message, cant get that text on the screen.

    Where can I get that message. Here is my simple program.

    Qt Code:
    1. #include <qapplication.h>
    2.  
    3. int main ( int anArgumentCount, char** anArguments )
    4. {
    5. QApplication anApplication ( anArgumentCount, anArguments );
    6.  
    7. qWarning ( "warning message ");
    8.  
    9. return anApplication.exec ();
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 

    Thx in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: where can I get qWarning () output

    did you look in the console?

  3. #3
    Join Date
    Mar 2006
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where can I get qWarning () output

    Yes, Its working fine for me.

    thank you.

  4. #4
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: where can I get qWarning () output

    Quote Originally Posted by high_flyer
    did you look in the console?
    For output in console used qDebug

    And about qWarning from Asistant
    Under X11, the text is printed to stderr. Under Windows, the text is sent to the debugger.
    a life without programming is like an empty bottle

  5. #5
    Join Date
    Aug 2006
    Location
    Romania
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: where can I get qWarning () output

    Adding console to the CONFIG options in the .pro file, also helps!

  6. #6
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where can I get qWarning () output

    Thanks a lot.. I was able to see the debug messages by using CONFIG += console in my application

  7. #7
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where can I get qWarning () output

    Or write Yours message handler and put all messages into the file.Read about this here.

Similar Threads

  1. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  2. Replies: 2
    Last Post: 2nd June 2008, 08:45
  3. Replies: 2
    Last Post: 20th July 2007, 16:34
  4. QProcess and capturing output
    By Aragorn in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2007, 16:57
  5. redirection of standard input and output
    By guestgulkan in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2006, 20:30

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.