How to Make Your Window Stay on Top in Qt

You can use the following snippet to make your MainWindow or any other window always on top:

setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);

Just insert it in your window’s constructor function.



How to Access Android Camera Using Qt/C++

In this article I am going to describe the required steps needed for accessing Android Camera (or Default Camera Interface) using Qt. Unfortunately OpenCV does not provide a reliable way of connecting to Camera in Android so you have go for a method like this if you intend to write an Android application which uses OpenCV and Qt together. I strongly recommend that you should first read this article (which describes how to access Android Gallery from Qt) and also this article (which shows how to mix Java and C++ code in Qt) and then return here because I will be assuming that you are familiar with those processes. So if you can already access Android Gallery using Qt then continue reading the steps described below.

Continue reading “How to Access Android Camera Using Qt/C++”