X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2FmonBoutonValide.py;h=146b2dfda0f69a6464443d89764b7808c1eeb3ae;hb=9bf98fc1cb51814c31679120598dc309e0802e31;hp=504184349206067e4c5530e88b1a19b1f81e758f;hpb=247d4d29c56a5f7ae8d3582c641f805443a141a6;p=tools%2Feficas.git diff --git a/InterfaceQT4/monBoutonValide.py b/InterfaceQT4/monBoutonValide.py index 50418434..146b2dfd 100644 --- a/InterfaceQT4/monBoutonValide.py +++ b/InterfaceQT4/monBoutonValide.py @@ -19,13 +19,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +from __future__ import absolute_import import re -from determine import monEnvQT5 -if monEnvQT5: - from PyQt5.QtWidgets import QToolButton, QToolTip -else : - from PyQt4.QtGui import * - from PyQt4.QtCore import * +import six + +import os + + +from PyQt5.QtWidgets import QToolButton, QToolTip from Extensions.i18n import tr class MonBoutonValide(QToolButton) : @@ -38,7 +39,7 @@ class MonBoutonValide(QToolButton) : def mouseDoubleClickEvent(self, event): #print "dans mouseDoubleClickEvent" - strRapport=unicode(self.parent.node.item.object.report()) + strRapport=six.text_type(self.parent.node.item.object.report()) self.parent.editor._viewText(strRapport, "JDC_RAPPORT") def mousePressEvent(self, event): @@ -48,7 +49,7 @@ class MonBoutonValide(QToolButton) : QToolTip.showText(event.globalPos(),myToolTip ) else : t="" - texte=unicode(self.parent.node.item.object.report()) + texte=six.text_type(self.parent.node.item.object.report()) deb=1 for l in texte.split('\n')[2:-2]: if re.match('^[\t !]*$',l) : continue