I typed two examples for "Hello World" program, one using "cout" but doesn't print anything, and the other by using "qDebug()" and printed the words, why "cout doesn't work?

Qt Code:
  1. #include <QCoreApplication>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8. QCoreApplication a(argc, argv);
  9.  
  10. cout << "Hello World!";
  11.  
  12.  
  13. return a.exec();
  14. }
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. #include <QCoreApplication>
  2. #include <iostream>
  3. #include <QDebug>
  4.  
  5. using namespace std;
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QCoreApplication a(argc, argv);
  10.  
  11. //cout << "Hello World!";
  12.  
  13. qDebug() << "Hello World!";
  14.  
  15. return a.exec();
  16. }
To copy to clipboard, switch view to plain text mode