]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix a problem with slow rendering of the qt widgets on remote host.
authorrnv <rnv@opencascade.com>
Thu, 23 May 2013 13:12:01 +0000 (13:12 +0000)
committerrnv <rnv@opencascade.com>
Thu, 23 May 2013 13:12:01 +0000 (13:12 +0000)
src/Session/SALOME_Session_Server.cxx

index ef6412c691c4729539a922c49c7b821200d41949..9fbb1542df009b38282b7c589d43b9f7a20b2957 100755 (executable)
@@ -403,6 +403,13 @@ int main( int argc, char **argv )
 {
   // Install Qt debug messages handler
   qInstallMsgHandler( MessageOutput );
+
+  //Set a "native" graphic system in case if application runs on the remote host
+  QString remote(getenv("REMOTEHOST"));
+  QString client(getenv("SSH_CLIENT"));
+  if(remote.length() > 0 || client.length() > 0 ) {
+    QApplication::setGraphicsSystem(QLatin1String("native"));
+  }
   
   // add $QTDIR/plugins to the pluins search path for image plugins
   QString qtdir( ::getenv( "QTDIR" ) );