I want to use &quot;QSessionManager&quot; in my PyQt4 application, so that it will be reloaded when the user logs back into KDE.&nbsp; I&#39;ve tried all of the following without success.<br><ul><li>QtGui.QApplication.saveState

( QtGui.QSessionManager() )</li><li>aMain.saveState( QtGui.QSessionManager() )</li><li>smCurrent = QtGui.QSessionManager()</li></ul>The error message I receive in each case is as follows.<br><ul><li>TypeError: QtGui.QSessionManager

 cannot be instantiated or sub-classed</li></ul>I searched on the web for this but found nothing of much use.&nbsp; Can someone please explain how to use &quot;QSessionManager&quot; from within a PyQt4 application?<br><br>