Salome HOME
check if QT_PLUGIN_PATH environment variable is not a valid directory or non existent... Salome_8_3_Hydro_1_1rc1 Salome_8_3_Hydro_2_0rc1
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 12 Jun 2017 14:23:04 +0000 (16:23 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Tue, 13 Jun 2017 16:32:01 +0000 (18:32 +0200)
bin/gui_setenv.py

index 5a4a44be37df54a0df354c9a3e41ecb7996f9f22..ec98f1bc8b3bafb40998b77c63b0b8624434be37 100644 (file)
@@ -29,7 +29,12 @@ def set_env( args ):
     dirs = re.split( ":|;", os.getenv( 'VTK_AUTOLOAD_PATH', vtk_overloads_dir ) )
     if vtk_overloads_dir not in dirs: dirs[0:0] = [vtk_overloads_dir]
     os.environ['VTK_AUTOLOAD_PATH'] = os.pathsep.join(dirs)
-    os.environ['QT_PLUGIN_PATH'] = ''
+    #print 'QT_PLUGIN_PATH: ', os.environ['QT_PLUGIN_PATH']
+    qt_plugin_dir = os.path.join( os.getenv( "QTDIR" ), "plugins" )
+    dirs = re.split( ":|;", os.getenv( 'QT_PLUGIN_PATH', qt_plugin_dir ) )
+    if qt_plugin_dir not in dirs: dirs[0:0] = [qt_plugin_dir]
+    dirs2 = list(set(dirs))
+    os.environ['QT_PLUGIN_PATH'] = os.pathsep.join(dirs2)
+    #print 'QT_PLUGIN_PATH: ', os.environ['QT_PLUGIN_PATH']
+    #print 'QT_QPA_PLATFORM_PLUGIN_PATH: ', os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']
     return
-
-