[PyQt] QtGui.QSessionManager: Syntax
Phil Thompson
phil at riverbankcomputing.co.uk
Sat Dec 15 11:18:53 GMT 2007
On Saturday 15 December 2007, Chris Giles wrote:
> > Thats all wrong. You are supposed to override saveState and commitData
> > in your own QApplication subclass.
> >
> > As Phil already said: You're not supposed to create a QSessionManager,
> > just to provide code that stores that state of your application.
>
> Thanks Phil and Andreas. I've taken a closer look and don't think my
> application will need "commitData". It will possibly need "saveState", but
> the documentation doesn't explain how to implement this function and I
> can't find any examples via a web search either.
Apologies if this is patronising, but do you know what "override"
and "reimplement" mean in an OO context? You need to provide a sub-class of
QApplication in which you provide your own implementation of saveState() that
does what you want.
Phil
More information about the PyQt
mailing list