]> SALOME platform Git repositories - tools/eficas.git/blob - InterfaceQT4/determine.py
Salome HOME
e0cf7e947c3d1cbfe5d8bde9bd827792dbda5976
[tools/eficas.git] / InterfaceQT4 / determine.py
1 import os
2
3 class envQT(object):
4     _instance = None
5     def __new__(cls, *args, **kwargs):
6         if not cls._instance:
7             cls._instance = super(envQT, cls).__new__(
8                                 cls, *args, **kwargs)
9
10         return cls._instance
11
12     def __init__(self):
13         if hasattr(self,'inQt5') : return
14         if 'PYQT_ROOT_DIR' in os.environ.keys(): qt=os.environ['PYQT_ROOT_DIR']
15         else : qt="Pyqt4"
16         if 'Pyqt-5' in qt : self.inQt5=True
17         else              : self.inQt5=False
18
19
20 monEnvQT5=envQT().inQt5
21 if __name__=='__main__':
22      inQt5_1=envQT().inQt5
23      inQt5_2=envQT().inQt5
24      print (inQt5_1)