Salome HOME
Merge tag 'V8_3_0a2' into ngr/python3_dev
[modules/gui.git] / src / GUI_PY / genericdialog.py
index 21fe81355623f59789b005593fac0c7ed7de29d1..8b8be1710647544dad229a77e2ddf3bcc7e11ae2 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
 __author__="gboulant"
 __date__ ="$31 mars 2010 17:09:53$"
 
-from PyQt4.QtGui import QDialog, QMessageBox
+from qtsalome import QDialog, QMessageBox
 
 from genericdialog_ui import Ui_GenericDialog
 
@@ -113,17 +113,16 @@ class GenericDialog(QDialog):
 #
 def TEST_GenericDialog():
     import sys
-    from PyQt4.QtGui import QApplication
-    from PyQt4.QtCore import QObject, SIGNAL, SLOT
+    from qtsalome import QApplication
     app = QApplication(sys.argv)
-    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+    app.lastWindowClosed.connect(app.quit)
 
     dlg=GenericDialog()
     dlg.displayAndWait()
     if dlg.wasOk():
-        print "OK has been pressed"
+        print("OK has been pressed")
     else:
-        print "Cancel has been pressed"
+        print("Cancel has been pressed")
         
 if __name__ == "__main__":
     TEST_GenericDialog()