Finally managed to make a KRunner plugin linking my Web Tech 2 project’s database. It allows the user to search the database from anywhere.
It is really easy to do it. I followed this guide from KDE website: http://techbase.kde.org/Development/Tutorials/Plasma/PythonRunner
To make it access the database, you need to import the Python/MySQL connector
import mysql.connector
We write the codes to query the database and send the results to KRunner. q contains the text the user input.
When its done, we compile it and install it:
plasmapkg –type runner –install ./
It’s done 🙂
Here’s the source code: qr_runner