Results 1 to 3 of 3

Thread: Why there is not console window?

  1. #1
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Thanks
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Why there is not console window?

    It's an example from C++ GUI programming with Qt 4.
    In this example, the book tells: the threads will print message to the console. but I cann't find even the console!

    Qt Code:
    1. void Thread::run()
    2. {
    3. while (!stopped)
    4. std::cerr << qPrintable(messageStr);
    5. stopped = false;
    6. std::cerr << std::endl;
    7. }
    8.  
    9.  
    10.  
    11. // the pro file
    12.  
    13. TEMPLATE = app
    14. CONFIG += console thread
    15. HEADERS = thread.h \
    16. threaddialog.h
    17. SOURCES = main.cpp \
    18. thread.cpp \
    19. threaddialog.cpp
    To copy to clipboard, switch view to plain text mode 

    Why? thanks!

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Why there is not console window?

    run you program in command prompt.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Thanks
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why there is not console window?

    Quote Originally Posted by spirit View Post
    run you program in command prompt.
    I do run it in command prompt always . but find nothing.

Similar Threads

  1. How to set Qt window transparent?
    By montylee in forum Qt Programming
    Replies: 17
    Last Post: 24th December 2013, 20:11
  2. Simulating a console window
    By Doug Broadwell in forum Newbie
    Replies: 3
    Last Post: 18th February 2011, 15:30
  3. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  4. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16
  5. qt without console window
    By jh in forum Qt Programming
    Replies: 3
    Last Post: 28th January 2006, 20:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.