MCPcopy Create free account
hub / github.com/MITK/MITK / getQApplication

Method getQApplication

Modules/AppUtil/src/mitkBaseApplication.cpp:865–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863 }
864
865 QCoreApplication *BaseApplication::getQApplication() const
866 {
867 if (nullptr == qApp)
868 {
869 vtkLogger::SetStderrVerbosity(vtkLogger::VERBOSITY_WARNING);
870
871 vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
872
873 auto defaultFormat = QVTKOpenGLNativeWidget::defaultFormat();
874 defaultFormat.setSamples(0);
875 QSurfaceFormat::setDefaultFormat(defaultFormat);
876
877#ifdef Q_OS_MACOS
878 QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
879#endif
880
881 QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
882 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
883
884 d->m_QApp = this->getSingleMode()
885 ? static_cast<QCoreApplication*>(new QmitkSingleApplication(d->m_Argc, d->m_Argv, this->getSafeMode()))
886 : static_cast<QCoreApplication*>(new QmitkSafeApplication(d->m_Argc, d->m_Argv, this->getSafeMode()));
887 }
888
889 return qApp;
890 }
891
892 void BaseApplication::initializeLibraryPaths()
893 {

Callers 4

initializeQtMethod · 0.95
installTranslatorMethod · 0.95
isRunningMethod · 0.95
sendMessageMethod · 0.95

Calls 2

getSingleModeMethod · 0.95
getSafeModeMethod · 0.95

Tested by

no test coverage detected