GuiPy: [skip ci] handle some Qt warnings when using GUI from Python
+ avoid warning: QEventLoop: Cannot be used without QApplication + avoid warning: QObject::startTimer: Timers can only be used with threads started with QThread
This commit is contained in:
@@ -147,14 +147,17 @@ namespace Gui {
|
||||
// Pimpl class
|
||||
struct ApplicationP
|
||||
{
|
||||
ApplicationP() :
|
||||
ApplicationP(bool GUIenabled) :
|
||||
activeDocument(0L),
|
||||
editDocument(0L),
|
||||
isClosing(false),
|
||||
startingUp(true)
|
||||
{
|
||||
// create the macro manager
|
||||
macroMngr = new MacroManager();
|
||||
if (GUIenabled)
|
||||
macroMngr = new MacroManager();
|
||||
else
|
||||
macroMngr = nullptr;
|
||||
}
|
||||
|
||||
~ApplicationP()
|
||||
@@ -451,7 +454,7 @@ Application::Application(bool GUIenabled)
|
||||
View3DInventorViewerPy ::init_type();
|
||||
AbstractSplitViewPy ::init_type();
|
||||
|
||||
d = new ApplicationP;
|
||||
d = new ApplicationP(GUIenabled);
|
||||
|
||||
// global access
|
||||
Instance = this;
|
||||
|
||||
Reference in New Issue
Block a user