Results 1 to 12 of 12

Thread: Thread Problems (i think)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Thread Problems (i think)

    cout works only on stdout, so you need to tell qmake this is a console app.
    Therefore add CONFIG += debug console to the pro file.

    In a GUI app you can try to output something to cerr. It might work.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Thread Problems (i think)

    Quote Originally Posted by LMZ View Post
    std::endl is not obligatory at all
    But lack of it prevents the output buffer from being flushed. Try adding it like J-P suggested.


    Quote Originally Posted by marcel View Post
    cout works only on stdout, so you need to tell qmake this is a console app.
    Therefore add CONFIG += debug console to the pro file.

    In a GUI app you can try to output something to cerr. It might work.
    He's using Linux, so that's not the case here. That is why I asked about the OS he uses.

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

    LMZ (29th September 2007)

Similar Threads

  1. canonicalFilePath() thread problems
    By magland in forum Qt Programming
    Replies: 10
    Last Post: 5th December 2007, 22:22
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13
  3. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 01:49
  4. [QT4] QThread and printing a QList<QPixmap>
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 22:44
  5. Problems with threads and windows
    By SkripT in forum Qt Programming
    Replies: 15
    Last Post: 16th January 2006, 18:46

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.