Salome HOME
Merge branch 'rnv/23406'
[modules/gui.git] / src / Session / SALOME_Session_Server.cxx
index a5389c9fce7b1e7c8cc1b6660a99e4a6d45987f7..ea144e9a96cb5e33c8361aa04a21094603f751d3 100755 (executable)
@@ -77,6 +77,9 @@
 #include <QWaitCondition>
 #include <QRegExp>
 #include <QTextStream>
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#include <QSurfaceFormat>
+#endif
 
 /*! - read arguments, define list of server to launch with their arguments.
  * - wait for naming service
@@ -366,6 +369,15 @@ int main( int argc, char **argv )
       QLocale::setDefault( QLocale::system() );
     }
   }
+  
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+  // initialization of the X11 visual on Linux
+  QSurfaceFormat format;
+  format.setDepthBufferSize(16);
+  format.setStencilBufferSize(1);
+  format.setProfile(QSurfaceFormat::CompatibilityProfile);
+  QSurfaceFormat::setDefaultFormat(format);
+#endif
 
   // Create Qt application instance;
   // this should be done the very first!