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
nice mysql connection via python, will need to try it
via java too can be useful
Initially i was trying to use c++ but i found the syntax a but difficult as a beginner. Then i set to python which is the easiest of all 😉