If you have already seen my Guide on How to Build Qt 5.5 Static wit MSVC then you probably won’t find anything new in this article. This only covers the paths and configurations for Qt 5.6 and it’s titled MSVC 2010 because Qt 5.6 installation includes pre-built libraries for all Compiler versions except MSVC 2010.
Continue reading “How to Build Qt 5.6 Statically Using MSVC++ 2010”How to Enable/Disable Qt Close Button
You can use the following piece of code in your Qt Window to disable Close (“X”) button in the title bar.
Continue reading “How to Enable/Disable Qt Close Button”How to Add Context Help Button to Qt Windows
You can use the following code to add Context Sensitive Help button (“?” button in the Window title bar) to your Qt Windows, that is QWindow or QMainWindow, not QDialog which has “?” button by default.
Continue reading “How to Add Context Help Button to Qt Windows”How to Open CHM Files and Topics in C++/Qt (Using Windows API)
In Qt/C++ you can open Compiled HTML Help files (*.CHM files) quite easily with a simple Win32 API function named HtmlHelp. In this post I have shared a wrapper function that you can copy and paste in your Qt/C++ code and use.
Continue reading “How to Open CHM Files and Topics in C++/Qt (Using Windows API)”How to Use SVN (Revision Control) with Qt
Whether you are developing PC (and mobile) applications for a company or for yourself, revision control should be a crucial part of what you do. The two major revision control systems are Git and Apache SVN. In this post I am going to show you how simple it is to use SVN with Qt.
Continue reading “How to Use SVN (Revision Control) with Qt”
How to Build for Windows XP Using MSVC 2015/2013/2012
To make your Qt application compatible with Windows XP (32-bit) you have to add the following line to your PRO file. Note that this will enable targeting for Windows XP without disrupting the application’s behavior in higher Windows versions.
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
You also need to install Visual C++ Redistributable for Visual Studio 2015. You can find Microsoft official link below:
https://www.microsoft.com/en-us/download/details.aspx?id=48145
How to Use Qt to Create Hybrid Applications
First of all you can check this link if you don’t know what hybrid applications are and what the difference between Hybrid and Native application is. In this article I am sharing the source code of a simple application that uses Qt with a combination of C++ and QML to run Hybrid applications (written using Framework7, Ionic or Famo.us) on the Operating Systems of your choice (Android, iOS, WP, Windows, Mac OS X and Linux).
Continue reading “How to Use Qt to Create Hybrid Applications”How to Check Internet Connection Availability Using Qt/C++
The one and only correct answer is, you have to check if you can access some famous (like Google or Facebook) server on the internet. This question comes up a lot and surprisingly enough there is no clear answer for it because being connected to the internet can have different meanings in different countries. For example in my home country of Iran (and in China and some other countries too), Facebook and some other popular websites are forbidden under the law, so being connected to the Internet does not mean being connected to Facebook, and vice versa. So, you have to use a website which is not forbidden in the country your app is going to be used, and then use the simple approach below:
Continue reading “How to Check Internet Connection Availability Using Qt/C++”How to Take Screenshots Using Qt
Qt allows you to easily grab an screenshot and save it using grabWindow function implemented in QScreen. Here is how you can use it:
Continue reading “How to Take Screenshots Using Qt”How to Record Videos Using OpenCV
In this post I am going to share a very simple but crucial parts of my QRecorder program which is recording images into videos. At the time of writing this article, Qt doesn’t allow recording of video files and OpenCV with its multi-platform support seems to be the best solution.
Continue reading “How to Record Videos Using OpenCV”