This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
L3GestionParking/src/v/MyQWidget.py

19 lines
637 B
Python
Raw Normal View History

2014-12-26 22:09:49 +00:00
from PyQt4 import QtGui
__author__ = 'sidya'
class MyQWidget(QtGui.QWidget):
def __init__(self, main):
super(MyQWidget, self).__init__()
self.__main = main
def closeEvent(self, event):
result = QtGui.QMessageBox.question(self,
2015-01-12 15:06:44 +00:00
"Confirmer Fermeture...",
2015-02-04 13:20:39 +00:00
"Etes vous sur de vouloir quitter ?\n",
2015-01-12 15:06:44 +00:00
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
2014-12-26 22:09:49 +00:00
event.ignore()
if result == QtGui.QMessageBox.Yes:
2015-01-12 15:06:44 +00:00
event.accept()
2015-02-04 13:20:39 +00:00
self.__main.showWindow()