QtCreator: add online-help if the SDK is not coming from an official package

Written by  on January 1, 2020


having some Qt-SDK without help files. Using help inside a browser is possible, but cumbersome. and local help would be nice for quick parameter-checks.

solution (edited):

Found also the official docu at: http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/qt5_5121_src_doc_examples/qt.qt5.5121.doc/ as 7z-archive.

Then add it via QtCreator > Tools > Options > Help > Documentation > “add the QCH files”.

QtCreator: SpellChecker – how to set up

Written by  on December 22, 2019

The plan is to use the spellchecker from https://github.com/CJCombrink/SpellChecker-Plugin
Let’s be honest: it is quite hard to extract the needed information for a proper setup of the spellchecker. I took me on first try several guesses, which files to download, where to put them and how to configure the dictionary.
Since the process is a bit tricky, my two cents:

  • download the current version for Win10 x64 from this page: https://github.com/CJCombrink/SpellChecker-Plugin/releases (currently “SpellChecker-Plugin_v2.0.5_x64.zip”)
  • extract
  • copy&paste the two folders “bin” and “lib” into the current QtCreator 4.11-directory (it has to be that version 4.11 else the plugin fails to load!): for me this is “C:\Qt\Tools\QtCreator”)
  • download the proper .aff and .dic files for the dictionary from: https://cgit.freedesktop.org/libreoffice/dictionaries/tree/en – for me “en_US”
  • start QtCreator and you should have under “tools > options” a new entry for “SpellChecker” … configure there the dictionary-usage
  • restart QtCreator (again!)
  • done 🙂

Qt: custom-class and specialities for QVariant and QSettings

Written by  on December 11, 2019

While implementing some custom-class (C++17; Qt5.12) some specialities became (painfully) noticeable.
The guide at the Qt-source is quite well written.

  • ctor, copy-ctor and dtor are all required and have to be public
  • add Q_DECLARE_METATYPE(CustomClass)
  • QDebug-stream-operator in case of simple debugging-messages
  • if the QVariant-version of the CustomClass shall be written to QSettings, then implement also the two streaming operators: << and >> (else crash with Assert “unable to save type”): howto

block ads on music videos on youtube

Written by  on December 9, 2019

Task: youtube has annyoing ads at certain music-videos, which are set as playback-version for last.fm. I like to stream some music while programming, but I hate getting conditioned by advertisments.

Situation: Firefox 71.0, 64 bit, Win10

Solution: install “AdBlocker for YouTube™von AdblockLite” and configure it like this:

MicroPython (uPython) – the future is here

Written by  on November 27, 2019

My activity with the ESP8266/ESP32 boards had somehow fallen asleep after I set up one of the ESP8266 as Wifi-repeater. It worked, but creating own devices was too cumbersome. Firing up the ArduinoStudio took ages, building and downloading the firmware in C++ was error-prone, took ages (seriously, this is a tiny program, what the hell happens in the background?).
But I knew there exists a path, which could save some time: µPython (micropython). It runs a firmware, you just deploy your “code”. In my case now a tiny hello-world-like program.

I used this and that tutorial and the uPyCraft-IDE. Got it working with an ESP8266 in minutes.

Seriously: goodbye crappy, non-structured and slow-to-build C/C++ for my microcontrollers. The future is here o/

By the way: the motivation also comes from my current daily practice of Python (of course, I still contribute to C++/Qt-based projects), but my current flame is Python (for Project Euler and daily coding challenges).

C++ name demangling

Written by  on November 20, 2019

Like described in “Today I learned” (TIL): c++filt is quite helpful for demangling:

But what if you have none readily available? -> c++filtjs

Three ways to find the location of a certain DLL at Windows

Written by  on November 11, 2019

Common problem: just using the current working directory is not sufficient, because especially for unit-tests started from the Visual Studio-testrunner the opriginal, relative path is not fitting anymore. Fallback would be check an environment variable , which is set during installation or using the WinAPI (ugh).

versioned code can be found at: github/cppcCollection

Visual Studio 2015: error LINK1158 rc.exe not found

Written by  on October 22, 2019

Challenge: Visual Studio 2015, Windows Kit 8 and 10 installed, test application (as solution) for a SDK not buildable
copy rc.exe and rcdll.dll from
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

SSH/SCP quick help

Written by  on October 17, 2019

Challenge was to reconfigure a device, which has a Linux running on a TQ-board. Some files had to be adjusted.

Connect to the device:

(Then enter password.)

List amount of free space:

Show target of symlink:

quick git stats

Written by  on October 11, 2019

(Another way without external tools.)