Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Qt 02 - hello world

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
14,975
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 3, 2011

A simple hello world application in QT

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (VoidRealms)

  • Errata (from offical Qt forums):

    04:42 Same thing; you get the QString #include “for free” because of other includes, but you’re not including it explicitely (nor including every header from core), which is bad practice

  • Errata (from offical Qt forums):

    04:15 QT += core doesn’t “add” anything to a specific file; you still must #include anything you use, or the compiler will complain (and Creator won’t autocomplete, etc.). The list that pops up is of classes, objects, macros, functions etc. you got by #including QCoreApplication and QDebug, and it does NOT contain EVERYTHING available in the core module (an #include QtCore would do that). For instance, QAbstractItemModel is missing from that list.

  • Errata (from offical Qt forums):

    01:00 add a note about why the two inclusion header are different?

    01:43 you’re not creating a QString, but using the QDebug::operator<<(const char *)

    02:06 QtCore is not a framework but a module/library

    03:20 same thing

    03:43 TARGET isn’t the name of the project but the name of the executable to build

see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • very good!!

  • hello guys with qt version 2.4.0

    after this tutorial i've also got 2 errors

    how to fix them : close the console window, rebuild everything

    should work

  • I could have sworn you said 'now we're just going to bitch shift out'. That is my new motto.

  • All the code in this tutorial gives me errors, and I'm not sure why.. any ideas?

  • hmm cout << "hello world"; works but qDebug() << "hello world!"; gives me errors. error: invalid use of incomplete type 'struct QDebug' error: forward declaration of 'struct QDebug' warning: inline function 'QDebug qDebug()' used but never defined

  • Nice tutorial!

  • thanks a lot, it really helps me, kepp going!

  • Thanks a lot!

  • Brain you are awesome! Great tutorial!!!

  • Could you put the corrections in annotations so I don't have to keep track of the comment?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more