Salome HOME
Merge remote-tracking branch 'origin/V8_4_BR' into hydro/imps_2017
[modules/gui.git] / src / SUITApp / SUITApp.cxx
index 8c1fd4b6c84d9916e7f3dd0a8a0cff4ec81d726c..75331cfa114b068acf3216f5dad43f348a7dacb6 100644 (file)
@@ -57,9 +57,6 @@
 #include <QRegExp>
 #include <QString>
 #include <QStringList>
-#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
-#include <QSurfaceFormat>
-#endif
 
 #include <stdlib.h>
 
@@ -183,12 +180,11 @@ int main( int argc, char* argv[] )
   }
 
 #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);
+  // RNV: setup the default format:
+  // QSurfaceFormat should be set before creation of QApplication,  
+  // so to avoid conflicts beetween SALOME and ParaView QSurfaceFormats we should merge theirs formats
+  // (see void Qtx::initDefaultSurfaceFormat()) and set the resultant format here.
+  Qtx::initDefaultSurfaceFormat();
 #endif
 
   // add <qtdir>/plugins directory to the pluins search path for image plugins