From: pascale.noyret Date: Mon, 14 Nov 2016 12:13:05 +0000 (+0100) Subject: 13685 X-Git-Tag: Salome_8_3_Hydro_2_0rc1~122 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=731851a564e2ea8558ad183a73a099e1cfe7b20c;p=modules%2Feficas.git 13685 --- diff --git a/InterfaceQT4/gereListe.py b/InterfaceQT4/gereListe.py index 4181974c..6dd0ae1e 100644 --- a/InterfaceQT4/gereListe.py +++ b/InterfaceQT4/gereListe.py @@ -23,7 +23,7 @@ import traceback from determine import monEnvQT5 if monEnvQT5: - from PyQt5.QtWidgets import QLineEdit, QLabel + from PyQt5.QtWidgets import QLineEdit, QLabel, QFileDialog from PyQt5.QtCore import QEvent, Qt from PyQt5.QtGui import QIcon, QPalette else : @@ -254,11 +254,12 @@ class GereListe: def selectInFile(self): - init=QString( self.editor.CONFIGURATION.savedir) + init=str( self.editor.CONFIGURATION.savedir) fn = QFileDialog.getOpenFileName(self.node.appliEficas, tr("Fichier de donnees"), init, tr('Tous les Fichiers (*)',)) + if monEnvQT5 : fn=fn[0] if fn == None : return if fn == "" : return ulfile = os.path.abspath(unicode(fn)) diff --git a/InterfaceQT4/monSelectVal.py b/InterfaceQT4/monSelectVal.py index 4fc9f223..8a6a2fbe 100644 --- a/InterfaceQT4/monSelectVal.py +++ b/InterfaceQT4/monSelectVal.py @@ -21,14 +21,17 @@ # Modules Eficas from desSelectVal import Ui_DSelVal -from determine import monEnvQT5 +from Extensions.i18n import tr +from determine import monEnvQT5 if monEnvQT5: - from PyQt5.QtWidgets import QDialog - from PyQt5.QtCore import QTimer + from PyQt5.QtWidgets import QDialog, QFileDialog + from PyQt5.QtCore import QTimer, Qt + from PyQt5.QtGui import QPalette else : from PyQt4.QtGui import * from PyQt4.QtCore import * + from PyQt4.QtGui import QPalette class DSelVal(Ui_DSelVal,QDialog): def __init__(self,parent ,modal ) : @@ -73,10 +76,9 @@ class MonSelectVal(DSelVal): def messageAChanger(self): message=self.parent.editor.sb.currentMessage() mapalette=self.sb.palette() - from PyQt4.QtGui import QPalette - mapalette.setColor( QPalette.WindowText, self.parent.editor.couleur ) - self.sb.setPalette( mapalette ); - self.sb.setText(tr(message)) + mapalette.setColor( QPalette.Text,Qt.red ) + self.sb.setPalette( mapalette ) + self.sb.setText(message) QTimer.singleShot(3000, self.efface) def efface(self):