I have experience with Qt, but not yet with writing KDE apps. Will let you know if I find anything. In general you can use QSettings to save state, but maybe KDE has a more tailored mechanism.