Following up on this post from last year, I’d like to share a couple of simple scripts that you can use to build OpenCV 3 or 4 on Windows, macOS and Linux operating systems. Needless to say, they require CMake and proper build tool sets on each platform.
Continue reading “OpenCV Build Scripts for Windows, macOS and Linux”Adding Required Includes and Libs for OpenCV 3.4.1 in qmake Projects
Here is what you need to add to your Qt qmake projects to be able to add and use OpenCV 3.4.1 default set of libraries. I usually add them into a separate *.pri file and include that in my *.pro files to avoid repetition, but that’s up to you. Well, here it is:
Continue reading “Adding Required Includes and Libs for OpenCV 3.4.1 in qmake Projects”Qt Application Fonts Missing or Invisible in Linux (Fixed)
By default Qt does not copy fonts along with your application when you deploy them under Linux. I recently faced this issue and none of the texts or labels on my Qt windows showed anything on them. All labels and text were blank and the forms looked completely empty.
Continue reading “Qt Application Fonts Missing or Invisible in Linux (Fixed)”Build Qt Statically for Linux
In this post I’ll describe how to build a static version of Qt under Linux (Ubuntu flavor) and I will use Qt 5.7.0 and Ubuntu 16.04 64-Bit for that matter. Static builds ease the process of app deployment under Linux cause it is quite complex (much more complex than Windows and Mac OS X) so without further ado, here it is.
Continue reading “Build Qt Statically for Linux”Build OpenCV Statically for Linux
This post describes how to build an static version of OpenCV for Linux operating systems. I am going to use OpenCV version 3.1.0 and Ubuntu 16.04 64-bit but the process should be more or less the same under CentOS or other flavors of Linux. So let’s start.
Continue reading “Build OpenCV Statically for Linux”How to Configure a Single Qt Project for Different Operating Systems
There are many cases in every cross-platform development framework that you want your source code to be built differently under different operating systems. For example you might want a method to to use platform specific functions in Windows, Linux and Mac OS X but you don’t want to have different projects for each one of them. If you are in a similar situation then you can use the following approach to have a single integrated project for all operating systems that you are developing for.
Continue reading “How to Configure a Single Qt Project for Different Operating Systems”How to Get the Topmost Window Title using Qt/C++ (in Linux)
Below I have described the method to get active (focused) windows title using Qt in Linux systems (Such as Ubuntu, CentOS etc.) Basically you use xdotool with two parameters mentioned below to get the title of current window which has the focus.
Continue reading “How to Get the Topmost Window Title using Qt/C++ (in Linux)”How to Get Current User Name in Qt/C++ (for Linux)
You can use the following function to get current user name is Linux. I have tested this on Ubuntu and CentOS flavors but it should also work with other flavors without any issues.
Continue reading “How to Get Current User Name in Qt/C++ (for Linux)”How to Install Graphical Interface for CentOS 7
After installing CentOS 7 you need to execute the following commands in order to install Gnome, or in other words have GUI mode of CentOS.
sudo yum groupinstall "Gnome Desktop"
startx