Monday, January 3, 2011

Print to console in Qt

To print to console in Qt
  1. write the code the usual console output way, e.g. "std::cout << ...", Note that any QString object must be quoted inside "qPrintable" function, e.g. "std::cout << qPrintable(QString("hello")) << .."
  2. enter "qmake -project"
  3. add "CONFIG += console" to the xxx.pro file
  4. enter "qmake"
  5. enter "make"

1 comment:

  1. Personally, I don't know programming, but I am happy to use such applications. All the more so if they are delivered in the cloud which is very convenient. Anyway, this native application development process is very good in my opinion.

    ReplyDelete