You can use the following Win32 API function to get the free disk space in C++. Note that this function can be used with Qt for Windows if you add the required dependencies described in this post.
Continue reading “How To Get Free Disk Space In C++ (Qt for Windows)”Download Template Project – Qt for Android (with OpenCV)
I start Qt for Android projects all the time and setting up all the required folders and including libraries can take some time, assuming that I don’t make any mistakes during the initialization of the project. Previously I had posted this about how to add OpenCV libraries to your Qt for Android project but it proved to be not enough and I also receive questions about how to create a correct project with OpenCV all the time.
Continue reading “Download Template Project – Qt for Android (with OpenCV)”
How to Sign Your APK in Qt
If you want to upload an Android application into your Google Play Developer account then you have to sign your apps. Pictures below explain how you can do this in Qt.
How to add Permissions to your Qt Android app
Whether you want to use GPS or Compass, Camera or the Internet, you will need to add permissions to your Qt app for Android because Android API uses a permission system for security reasons. It actually has other benefits such as helping with monitoring and app statistics and so on but I’m not going to discus that in this post.
If you need to add permissions to your Qt Android app then follow these steps.
Continue reading “How to add Permissions to your Qt Android app”How to set icon for Android app in Qt
When you create an Android app in Qt, the icon of your app remains the default set by Qt, it’s this one:
Usually you want to change it for a more meaningful icon. Follow the steps bellow to be able to change this icon in Qt.
Continue reading “How to set icon for Android app in Qt”How to install Qt for Android
If you are a fan of Qt and don’t want to change to another IDE for developing Android apps then this post is for you.
Follow the steps below to have Qt for Android installed in your computer.
How to use VBScript in C++ (Using Qt)
In this article I’ll explain the process of combining C++ and VBScript codes together. There are many situations in which you find yourself in desperate need of some simple code that can handle what your program wants to do. An example that comes to my mind is using DDE Protocol in Windows. It can be heartbreaking to try and write a quick DDE handling program using C++. Well on the other hand it is extremely easy using VBScript. But I am not going to talk about DDE I this post. Search Google for “how to connect to DDE using VBScript” and combine that with what you learn from this post. So here it is:
Continue reading “How to use VBScript in C++ (Using Qt)”How to use System-Wide Hotkeys in your Qt application
First of all, this method can only be used in Windows because it makes use of the RegisterHotKey function which is a Win32 API function. So if you want to trigger a function in your Qt application even when your application is out of focus or minimized or even hidden then follow the steps below one by one:
Continue reading “How to use System-Wide Hotkeys in your Qt application”How to make an application “Alway on Top” in C++ (For Qt and Win32)
I use the following method to make an application remain on top of other windows in Qt:
SetWindowPos
(
(HWND)winId(),
HWND_TOPMOST,
window_top_pos,
window_left_pos,
window_width,
window_height,
SWP_SHOWWINDOW
);
Note that window_top_pos, window_left_pos, window_width and window_height are variables and you can replace them with your own.
Please be aware that this is a Win32 API function so it won’t work in Linux or MAC.
Don’t forget to add the include file to your code.
#include "windows.h"
And add the required library to your .PRO file.
LIBS += -luser32
OpenCV Multiple Object Trackers (Using Camshift) Video Demo
Following video demonstrates the application in my previous post about Multiple Object Tracking while it is tracking 3 different objects.
You can find the post using the link below:
http://amin-ahmadi.com/2015/10/20/camshift-multiple-trackers-application-and-source-code/
https://www.youtube.com/watch?v=-Yy_GA-7SNM