Qt Tutorials For Beginners – Create First Qt Application
In this tutorial we will learn how to create our first qt application.
Step 1 – File->Other Project->Empty Qt Project
When we create a Empty Qt Project There is nothing in the Project explorer, and even the .pro file has nothing in it. So, we need to create a main.cpp file.
Step 2 – Right Click on Project -> Add New -> C++ -> C++ Source file -> Choose
And Give the name main.cpp file and press finish.
main.cpp
#include <QApplication>
#include <QLabel>
#include <QWidget>
QApplication
QLabel hello"Hello World"
hellosetWindowTitle"My First Qt Program"
helloresize
hello
return
|
HelloWorld.pro
greaterThanQT_MAJOR_VERSIONwidgets
SOURCES
|
Output
Comments
Post a Comment