5/ QtCreator Android Configuration File
If you use QtCreator with Qt for Android kits, you may need to configure QtCreator to tell it which are the versions you want to use (android tools, ndk, etc.) for a given Qt version. Under Linux, this can be configured in file ~/.config/QtProject/qtcreator/android
6/ Build Qt for Windows Using Wine
A lot of times when you are developing for Windows on a Linux machine you’ll work with a virtual machine – but did you know you can build and run your Qt for windows application on Linux using wine?
Wine is, a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux. While best known for enabling gamers to play their PC games on other operating systems, with Wine installed you can also work with Qt for Windows in your familiar Linux environment.
7/ Logging Categories in Qt
Now, this isn’t going to change your world, but it will make your job just a little bit easier.
Logging is an essential part of Qt and most any other application. Logging makes it easier to figure out what is going on during development and debugging so that, when you get that message and you don’t quite know (or remember!) what it means, it’s a breeze to figure it out.
Qt offers a convenient feature, called QLoggingCategory, that allows you to dynamically modify which statements should be shown. More importantly, Qt framework itself uses them extensively, so if you wish to make Qt a bit more verbose regarding a specific topic, you can use the QT_LOGGING_CONF environment variable at run time, no need to rebuild your application or Qt for that.
8/ Config for Visibility (Windows/Linux)
One of the great things about Qt is its portability. You can run it on Linux, on Android, on Linux Embedded and on Windows, too. Using the same codebase on Linux and Windows can be a big time-saver, but there can be issues, too.
Qt5 introduced the new signal/slot connection syntax, which has several advantages. However, if you use the new syntax with signals and slots from different libraries under Windows, you may have noticed that the slots are not being called – this can be fixed by using the Q_DECL_IMPORT/Q_DECL_EXPORT directives.
But note, too, that this is a bit tricky since if some Q_DECL_XXX statements are missing under Windows, the link will fail, while it will succeed under Linux. So, if you develop most of your codebase under Linux, you might discover tons of missing Q_DECL_XXX statements when you switch to Windows.
One solution for that is to use the CONFIG += hide_symbols statement, so that even under Linux, missing Q_DECL_XXX statements will trigger some link errors.
If you configure for variability – and it’s just a matter of directing the compiler not to export the symbols by default – you can ensure that your Linux and Windows builds run equally well.