diff --git a/vn.event/eventEngine.py b/vn.event/eventEngine.py index d892177f..c96dd71e 100644 --- a/vn.event/eventEngine.py +++ b/vn.event/eventEngine.py @@ -6,9 +6,6 @@ from threading import Thread from time import sleep from collections import defaultdict -# 第三方模块 -from PyQt4.QtCore import QTimer - # 自己开发的模块 from eventType import * @@ -63,6 +60,9 @@ class EventEngine(object): self.__thread = Thread(target = self.__run) # 计时器,用于触发计时器事件 + # 第三方模块 + from PyQt4.QtCore import QTimer + self.__timer = QTimer() self.__timer.timeout.connect(self.__onTimer) diff --git a/vn.trader/eventEngine.py b/vn.trader/eventEngine.py index d892177f..c96dd71e 100644 --- a/vn.trader/eventEngine.py +++ b/vn.trader/eventEngine.py @@ -6,9 +6,6 @@ from threading import Thread from time import sleep from collections import defaultdict -# 第三方模块 -from PyQt4.QtCore import QTimer - # 自己开发的模块 from eventType import * @@ -63,6 +60,9 @@ class EventEngine(object): self.__thread = Thread(target = self.__run) # 计时器,用于触发计时器事件 + # 第三方模块 + from PyQt4.QtCore import QTimer + self.__timer = QTimer() self.__timer.timeout.connect(self.__onTimer)