44import pickle
55from threading import Thread
66
7- from PySide2 import QtCore , QtGui
8- from PySide2 .QtGui import QKeyEvent
9- from PySide2 .QtWidgets import (QApplication , QLabel , QSizePolicy , QMainWindow ,
10- QScrollArea , QMessageBox , QAction , QFileDialog ,
7+ from PySide6 import QtCore , QtGui
8+ from PySide6 .QtGui import QKeyEvent , QAction
9+ from PySide6 .QtWidgets import (QApplication , QLabel , QSizePolicy , QMainWindow ,
10+ QScrollArea , QMessageBox , QFileDialog ,
1111 QColorDialog , QInputDialog , QWidget ,
1212 QGestureEvent )
1313
@@ -547,7 +547,7 @@ def openStatePoint(self):
547547 "opening a new one." )
548548 msg_box .setIcon (QMessageBox .Information )
549549 msg_box .setStandardButtons (QMessageBox .Ok )
550- msg_box .exec_ ()
550+ msg_box .exec ()
551551 return
552552 filename , ext = QFileDialog .getOpenFileName (self , "Open StatePoint" ,
553553 "." , "statepoint*.h5" )
@@ -562,7 +562,7 @@ def openStatePoint(self):
562562 msg_box .setText (msg .format (filename ))
563563 msg_box .setIcon (QMessageBox .Warning )
564564 msg_box .setStandardButtons (QMessageBox .Ok )
565- msg_box .exec_ ()
565+ msg_box .exec ()
566566 finally :
567567 self .statusBar ().showMessage (message .format (filename ), 5000 )
568568 self .updateDataMenu ()
@@ -583,7 +583,7 @@ def importProperties(self):
583583 msg_box .setText (f"Error opening properties file: \n \n { e } \n " )
584584 msg_box .setIcon (QMessageBox .Warning )
585585 msg_box .setStandardButtons (QMessageBox .Ok )
586- msg_box .exec_ ()
586+ msg_box .exec ()
587587 finally :
588588 self .statusBar ().showMessage (message .format (filename ), 5000 )
589589
@@ -869,7 +869,7 @@ def editMaskingColor(self):
869869 dlg = QColorDialog (self )
870870
871871 dlg .setCurrentColor (QtGui .QColor .fromRgb (* current_color ))
872- if dlg .exec_ ():
872+ if dlg .exec ():
873873 new_color = dlg .currentColor ().getRgb ()[:3 ]
874874 self .model .activeView .maskBackground = new_color
875875 self .colorDialog .updateMaskingColor ()
@@ -879,7 +879,7 @@ def editHighlightColor(self):
879879 dlg = QColorDialog (self )
880880
881881 dlg .setCurrentColor (QtGui .QColor .fromRgb (* current_color ))
882- if dlg .exec_ ():
882+ if dlg .exec ():
883883 new_color = dlg .currentColor ().getRgb ()[:3 ]
884884 self .model .activeView .highlightBackground = new_color
885885 self .colorDialog .updateHighlightColor ()
@@ -894,7 +894,7 @@ def editOverlapColor(self, apply=False):
894894 current_color = self .model .activeView .overlap_color
895895 dlg = QColorDialog (self )
896896 dlg .setCurrentColor (QtGui .QColor .fromRgb (* current_color ))
897- if dlg .exec_ ():
897+ if dlg .exec ():
898898 new_color = dlg .currentColor ().getRgb ()[:3 ]
899899 self .model .activeView .overlap_color = new_color
900900 self .colorDialog .updateOverlapColor ()
@@ -907,7 +907,7 @@ def editBackgroundColor(self, apply=False):
907907 dlg = QColorDialog (self )
908908
909909 dlg .setCurrentColor (QtGui .QColor .fromRgb (* current_color ))
910- if dlg .exec_ ():
910+ if dlg .exec ():
911911 new_color = dlg .currentColor ().getRgb ()[:3 ]
912912 self .model .activeView .domainBackground = new_color
913913 self .colorDialog .updateBackgroundColor ()
@@ -1036,7 +1036,7 @@ def editDomainColor(self, kind, id):
10361036 elif isinstance (current_color , str ):
10371037 current_color = openmc .plots ._SVG_COLORS [current_color ]
10381038 dlg .setCurrentColor (QtGui .QColor .fromRgb (* current_color ))
1039- if dlg .exec_ ():
1039+ if dlg .exec ():
10401040 new_color = dlg .currentColor ().getRgb ()[:3 ]
10411041 domain [id ].color = new_color
10421042
0 commit comments