I use the function below to get the version of my Windows applications and show it on the title bar or about page programmatically. It uses Win32 API so it is not cross-platform.
Another note to myself which I hope will be useful for others searching it.
Add the following lines to your PRO file in Qt, or create a PRI file using the following and include that in your PRO file.Continue reading “OpenCV + Qt + Android, Adding Required Libraries and Includes”
I was able to successfully build Qt 5.4.2 Static using Microsoft Visual C++ 2013 (MSVC2013)
It is almost the same as my post on Qt 5.4.0 Static using MSVC2010
Again, please keep in mind that these are NOT some exact steps and you can change the folders to another path that suits you.
Following slides contain valuable information on Qt, Android and JNI that were presented during Qt Developer Days 2014.
How to call a Java function using C++ (Qt) and how to call-back a C++ (Qt) function using Java are described here.
They’re originally taken from http://www.qtdeveloperdays.com
I use the code from the following article to allow only a single instance of my programs (mostly written using Qt Framework) to run on Windows. Some programs (specially the ones which connect to a specific type of hardware or resource) need this limitation to avoid conflicts.
Please also note that this code is specific to Windows.
I keep the following notes (steps) as a personal guideline for building Qt Statically using Microsoft Visual C++ and I never fail to do it but please keep in mind that these are NOT some exact steps and they need to be changed (slightly though 🙂 ) in some cases. Leave comments if you have any questions.
I have used Qt 5.4.0 with Microsoft Visual C++ 2010 (MSVC2010) but it is more or less the same for similar compilers and others Qt versions.
Update on March 18th, 2018: Now you can use this post for a more recent, accurate and complete guide on adding OpenCV to Qt projects.
Use the following lines in a .pri file that is added to your project by using “include(C:/opencv/opencv.pri)”. This allows easy including of headers and library references in a Qt project.
(Note that in case you are using another version of OpenCV, your library names might be different.)Continue reading “Required Includes and Libraries for OpenCV in Qt”
This function can be used to get an EXE file version. I use this class in almost all of my programs to add EXE version to Main window title.Continue reading “Get EXE version using Windows API in Qt”
Class below allows catching of Exceptions in Qt. Paste all code below into a header and use this class instead of QApplication in your main function.Continue reading “Qt class for catching exceptions (QExSafeApplication)”