Merge pull request #20110 from WandererFan/HeadlessViewCreation20024

[TD]Headless view creation (fix #20024)
This commit is contained in:
Chris Hennes
2025-03-22 12:20:58 -05:00
committed by GitHub
6 changed files with 84 additions and 55 deletions

View File

@@ -1897,6 +1897,13 @@ std::string DrawUtil::cleanFilespecBackslash(const std::string& filespec)
return noBackslash;
}
//! returns true if the Gui module and its event loop are active.
bool DrawUtil::isGuiUp()
{
auto* app = QCoreApplication::instance();
return (app != nullptr) && app->inherits("QApplication");
}
//============================
// various debugging routines.