|
@@ -1,10 +1,13 @@
|
|
|
import sys
|
|
import sys
|
|
|
from PyQt4 import QtGui
|
|
from PyQt4 import QtGui
|
|
|
-from PyQt4 import QtCore
|
|
|
|
|
from FlatCAMApp import App
|
|
from FlatCAMApp import App
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def debug_trace():
|
|
def debug_trace():
|
|
|
- '''Set a tracepoint in the Python debugger that works with Qt'''
|
|
|
|
|
|
|
+ """
|
|
|
|
|
+ Set a tracepoint in the Python debugger that works with Qt
|
|
|
|
|
+ :return: None
|
|
|
|
|
+ """
|
|
|
from PyQt4.QtCore import pyqtRemoveInputHook
|
|
from PyQt4.QtCore import pyqtRemoveInputHook
|
|
|
#from pdb import set_trace
|
|
#from pdb import set_trace
|
|
|
pyqtRemoveInputHook()
|
|
pyqtRemoveInputHook()
|
|
@@ -12,9 +15,10 @@ def debug_trace():
|
|
|
|
|
|
|
|
debug_trace()
|
|
debug_trace()
|
|
|
|
|
|
|
|
-# all X11 calling should be thread safe otherwise we have strange issues
|
|
|
|
|
-QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
|
|
|
|
|
|
|
+# All X11 calling should be thread safe otherwise we have strange issues
|
|
|
|
|
+# QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
|
|
|
|
|
+# NOTE: Never talk to the GUI from threads! This is why I commented the above.
|
|
|
|
|
|
|
|
app = QtGui.QApplication(sys.argv)
|
|
app = QtGui.QApplication(sys.argv)
|
|
|
fc = App()
|
|
fc = App()
|
|
|
-sys.exit(app.exec_())
|
|
|
|
|
|
|
+sys.exit(app.exec_())
|