First of all let’s briefly go through what’s an OBJ File. Here’s a very brief description from Wikipedia: “OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for its Advanced Visualizer animation package. The file format is open and has been adopted by other 3D graphics application vendors.” Anyway, I’ll assume that now that since you’re here you already know what an OBJ File is and How and Where to use it.
If you’re a regular Qt user (like me) and have tried writing Android applications with Qt then you must have come across situations where you’ve needed some very simple capabilities of Android API but it wasn’t present in the Qt library. Displaying a Toast message in Qt for Android is one of those situations. In this post I’m going to describe how to display Toast messages in Qt for Android, and it’s also a very good example of showing how to use JNI (QAndroidJniObject class in Qt, along with Java code) to access Java code from within C++/Qt code.
I have tried numerous methods to get an application’s own version number and believe me this is the best way to get it. First of all if we consider the fact that setting a Qt application version is done in PRO file (qmake) using the following simple command:
VERSION = 188.8.131.52
Then getting this same value should be the easiest possible method.
Just add the following line to your PRO file after defining version as seen above and you can use the same version string wherever you like in the code:
DEFINES += APP_VERSION=\\\”$$VERSION\\\”
APP_VERSION will contain the string “184.108.40.206” and can be used in the C++ code.
When using Qt creator following error starts rising up when Xcode gets updated to version 8.0 and it’s because of a change that is not yet applied in Qt settings. In my case it happened with Qt 5.7 and Xcode 8.0 on Mac OS X El Capitan but I think it’s safe to assume similar issues will start rising up with other kits too. Here is how I fixed it.
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.
In this post I’ll describe how to reset the changes and discard whatever you have done (maybe you decided the changes weren’t required at all) using Git in Qt Creator. If you already know how to install Git and use it with Qt Creator then continue reading, if not then you should first read this post to get you up on feet.
Git is one of the most popular version control systems and Qt Creator provide very intuitive and easy to use tools to interact with Git and skip all the command-typing that is required by Git. I think it is safe to assume that you already know how to get Git (https://git-scm.com/). If Git is already installed and present in the system then Qt Creator will automatically pick it up and you can start using it right away.
In this post I am going to share a Qt widget that allows full control (view and control) of VNC servers over TCP/IP. Using it is as simple as dropping a QWidget on your user interface and then promoting it to QVNCClientWidget. I needed this recently but was not able to find a Qt widget or any other Qt/C++ code for that matter, that supports VNC Authentication and can be used in a real cross-platform way. So I had to gather and write this widget piece by piece and make sure it build on all platforms supported by Qt.
In this post I will describe how to build Qt 5.7 statically for Windows using MSVC 14 compiler or in other words Microsoft Visual C++ 2015 which is included in Microsoft Visual Studio 2015. Quite obviously you need to install Microsoft Visual Studio 2015 (Community edition is free) before continuing with this guide. You can find it here: https://www.visualstudio.com/
First of all I assume you have seen this post which describes how to build opencv statically for Linux. If that is the case then you can just add the following code to your qmake .PRO file to use opencv with Qt.
CONFIG += link_pkgconfig
PKGCONFIG += opencv