Qt hello world

Alright we will start with a basic hello world example :)

NOTE : i am assuming you know basics of C++ .

1. Open up your QTcreator .

2. click on File -> New File or Project -> Qt console application . Give your project a name (hello for example)

3. You will get some auto-generated code (main.cpp file)

4. include this header file in your main.cpp : #include <QDebug>

5. add this line in your code : qDebug() <<"hello world";

6. Click on run ( that green play button in your sidebar )

7. You did it !!


P.S. if you run into any problem look at this code  :

#include <QCoreApplication>
#include <QDebug>

int main(int argc, char *argv[])

{
    QCoreApplication a(argc, argv);

    qDebug() <<"Hello World";

    return a.exec();
}