This is template for a KRunner plugin written in C++ and Qt which uses the DBus API.
It is based on a test class of the official KRunner project: https://github.com/KDE/krunner/blob/master/autotests/testremoterunner.h
Additionally it has a list of the required build dependencies and a preconfigured build.
For more information and the advantages of DBus visit: http://blog.davidedmundson.co.uk/blog/cross-process-runners/
Icon from: https://www.iconfinder.com/icons/386489/qt_icon