This is more than just a “Hello World” app. It uses the linux notification API to send global notifications.
It is very easy to do this. It’s like working in Visual Basics.
- Create a button in the ui editor.
- Right-click on it then select “Go to slot”
- Select signal “clicked()”
For following code will be created in mainwindow.cpp
Now you can add the notify function between the curly brackets
system("kdialog --title '*le Nayar testing' --passivepopup \"Hahaha, i still don't know how to fetch the text above \"");
You can alternatively use libnotify instead of kdialog. libnotify works in both GNOME and KDE.
system("notify-send '*le Nayar testing' \"Hahaha, i still don't know how to fetch the text above \"");
Now i need to put some variables instead of hardcoding texts and play with the options provided by kdialog and libnotify