![]() Registered Member ![]()
|
Hello.
I'm trying to implement session management for a small program (KRadioRipper). However, it doesn't work ![]() (I'm using KDE 4.1.3 on openSUSE 11.1) The main window of KRadioRipper is a class that inherits from KXmlGui window (which inherits from KMainWindow). The documentation of KMainWindow says, that when implementing session management, we should not rely on Qt solutions (QSessionManager and so on...), but instead just reimplement queryClose(), saveSettings() and readSettings() from KMainWindow. This way, KMainWindow will take care of the session management. So I've done this:
And I don't understand why readSettings() is never called. (I've tried this with putting in readSettings() code that shows a message box -> it is really never called). Should not KMainWindow call readSettings() automatically? Or do I have to do this manually??? Or did I forget to initialize the session management somehow? Or did I forget something else? Can you help me?
Last edited by urwald on Mon Dec 29, 2008 9:00 pm, edited 1 time in total.
urwald, proud to be a member of KDE forums since 2008-Oct.
|
![]() KDE Developer ![]()
|
You'll need a bit of extra code in your main() function:
http://techbase.kde.org/Development/Arc ... Management and http://api.kde.org/4.x-api/kdelibs-apid ... 9f4af1cb97 Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Thank you very much. Now I understand how this is working...
And a happy new year!!! Cheers. Tim
urwald, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell