Thanks again spirit..
  • But here i want to reimplement the minimize event for which i need to connect my own method as a substitute to the predefined method like this..
    Qt Code:
    1. exit=QtGui.QAction(self)
    2. self.connect(exit,QtCore.SIGNAL('triggered()'),QtCore.SLOT('close()'))
    To copy to clipboard, switch view to plain text mode 
    Reimplemented method:
    Qt Code:
    1. def closeEvent(self,event):
    2. reply=QtGui.QMessageBox.question(self,'Message',"Are you sure to quit?",QtGui.QMessageBox.Yes,QtGui.QMessageBox.No)
    3. if reply==QtGui.QMessageBox.Yes:
    4. event.accept()
    5. else:
    6. event.ignore()
    To copy to clipboard, switch view to plain text mode 
  • In the same manner as above, is there any way of doing the same job for minimize event.. In showMinimized method we are calling this purposely to minimize the window which can be attained in the way as you described (as well as by self.showMinimized() in it's __init__ method..
  • My ultimate aim is to hide the QTabWidget() if minimize or close event is encountered.. The only way to quit from the application is to select exit from the tray icon's context menu..

Thanks for all your help..