Introduction
You may have used various kinds of software, like antiviruses, Adobe Photoshop, AMD's software, virtual machines, OpenOffice, VLC, or other software, like screen/webcam recorders, 3D graphics software or downloaders like Torrentz or uploaders like FileZilla etc. They all use the same application framework.
Qt is a cross-platform GUI application framework that is used for developing application software that can be run on various software and hardware platforms with little or no changes in the underlying code.
Qt is currently being developed both by the Qt Company, a publicly listed company, and the Qt Project under open-source governance, involving individual developers and firms working to advance Qt.
Qt is available as both proprietary and open source.
Here's the list of applications that use Qt,
You may have used various kinds of software, like antiviruses, Adobe Photoshop, AMD's software, virtual machines, OpenOffice, VLC, or other software, like screen/webcam recorders, 3D graphics software or downloaders like Torrentz or uploaders like FileZilla etc. They all use the same application framework.
Qt is a cross-platform GUI application framework that is used for developing application software that can be run on various software and hardware platforms with little or no changes in the underlying code.
Qt is currently being developed both by the Qt Company, a publicly listed company, and the Qt Project under open-source governance, involving individual developers and firms working to advance Qt.
Qt is available as both proprietary and open source.
Here's the list of applications that use Qt,
- https://en.wikipedia.org/wiki/Category:Software_that_uses_Qt
- https://wiki.manjaro.org/index.php?title=List_of_Qt_Applications
OK, enough talking. Let's start.
First, download the Qt source for Visual Studio (Microsoft Visual C++ (msvc)).
I am using Visual Studio 2013 Professional version, so I have downloaded qt-opensource-windows-x86-msvc2013_64-5.5.1.exe file.
The 5.5 version is here: https://download.qt.io/archive/qt/5.5/5.5.0/
If you are using Visual Studio version 2015, download MSVC 2015 here:
First, download the Qt source for Visual Studio (Microsoft Visual C++ (msvc)).
- https://download.qt.io/archive/qt/
I am using Visual Studio 2013 Professional version, so I have downloaded qt-opensource-windows-x86-msvc2013_64-5.5.1.exe file.
The 5.5 version is here: https://download.qt.io/archive/qt/5.5/5.5.0/
If you are using Visual Studio version 2015, download MSVC 2015 here:
https://download.qt.io/archive/qt/5.8/5.8.0/
Or download the latest version if you are using the latest version of Visual Studio.
Once you download it, start the setup.
It has the following screens.
Click "Next".


Skip this step.


Select the folder where you want to install it and click "Next".
Select the components that you want to install, make sure the MSVC options is selected. If you need the sources, then also, select that option.
Click "Next".
Drink a cup of coffee until it finishes.
Once the installation is completed, then open the Visual Studio.
Select Tools -> Extensions and Updates option and search Qt in the search box.
Download and install Qt Visual Studio Tools.
Once it installed, restart the Visual Studio.
You can see one option added on menubar, QT VS TOOLS.
You can see one option added on menubar, QT VS TOOLS.
Now, select QT VS Tools -> Qt option.
It will pop up a dialog.
It will pop up a dialog.
Click on the "Add" button.
Enter the version of Qt you have just installed and select the installation msvc folder.
Everything's done, now go to File -> New -> Project.
Drop the Visual C++ list, and select Qt and Qt GUI application.
Enter project name as Qt_Demo and click OK.
Drop the Visual C++ list, and select Qt and Qt GUI application.
Enter project name as Qt_Demo and click OK.

It will start an app wizard.
Click "Next".
Select the components that you are using in your Qt application.
For now, keep it as it is and click "Next".
Select the components that you are using in your Qt application.
For now, keep it as it is and click "Next".
Select the filename and click "Finish".
Once the solution is created, it will create many files in Solution Explorer.
But we don't need all those for now. So, delete the following files.
- Qt_Demo.ui
- Qt_Demo.h
- Qt_Demo.qrc
- Qt_Demo.cpp
- Form Files folder
Now, we have only one file main.cpp
Copy and paste the following code to the editor and replace it.
Copy and paste the following code to the editor and replace it.
- #include<qapplication.h>
- #include<qwidget.h>
- int main(int argc, char**argv)
- {
- //declare qt main application class with arguments
- QApplication qt_app(argc, argv);
- //create a window widget object
- QWidget *window = new QWidget();
- //declare a size object for size of window
- QSize window_size;
- window_size.setWidth(600);
- window_size.setHeight(400);
- //declare a point object for location of window
- QPoint window_location;
- window_location.setX(100);
- window_location.setY(80);
- //set properties to window
- window->resize(window_size);
- window->move(window_location);
- window->setWindowTitle("Qt Demo");
- //display the window
- window->show();
- //return the executable result
- return qt_app.exec();
- }


Join the conversation! Your thoughts help the community grow.