![]() Registered Member ![]()
|
I'm doing a plasmoid and I have doubts with the configuration part. I've done a Config Widget with designer and now I can use it in my plasmoid.
The doubt is related to saving and loading configuration. Seeing plasmoids of websvn and kde-apps.org all of them use a KConfigGroup initialitzed with the function config(). Then they use the readEntry method to read configuration entries. Doing the same with my plasmoid to save and load configuration doesn't work. My question is if there is any extra thing I must do. Where are the config files? Reading the KConfigXT tutorial in techbase talks about a .kfgc file but I don't see any of this files in the sources of the plasmoid I've looked at. Thanks!
Last edited by pukyxd on Sun Feb 22, 2009 10:22 pm, edited 1 time in total.
|
![]() Administrator ![]()
|
Is there somewhere you can post your code? Without having a look at that it is difficult to tell why it isn't working.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I've uploaded the code to pastebin:
http://pastebin.com/pastebin.php?dl=mbdb35ed -> plasma-timetable.h http://pastebin.com/pastebin.php?dl=m2909c120 -> plasma-timetable.cpp
Last edited by pukyxd on Mon Feb 23, 2009 8:11 am, edited 1 time in total.
|
![]() Administrator ![]()
|
Read entry will return the information you desire in any number of formats, as specified by the KConfigGroup documentation ( available at api.kde.org ).
You need to save what it returns:
Or in your case:
Last edited by bcooksley on Mon Feb 23, 2009 8:40 am, edited 1 time in total.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks! Now it works! I missed the assignation...
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell