Skip to content

Commit

Permalink
[Mod] support use PySide2 as UI backend
Browse files Browse the repository at this point in the history
  • Loading branch information
vnpy committed Feb 6, 2022
1 parent 94d5440 commit 74a62a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/vn_trader/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp

from vnpy_ctp import CtpGateway
# from vnpy_ctp import CtpGateway
# from vnpy_ctptest import CtptestGateway
# from vnpy_mini import MiniGateway
# from vnpy_femas import FemasGateway
Expand Down Expand Up @@ -50,7 +50,7 @@ def main():

main_engine = MainEngine(event_engine)

main_engine.add_gateway(CtpGateway)
# main_engine.add_gateway(CtpGateway)
# main_engine.add_gateway(CtptestGateway)
# main_engine.add_gateway(MiniGateway)
# main_engine.add_gateway(FemasGateway)
Expand Down Expand Up @@ -92,7 +92,7 @@ def main():
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()

qapp.exec()
qapp.exec_()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion vnpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.9.0"
__version__ = "3.0.0"
6 changes: 5 additions & 1 deletion vnpy/trader/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import types

import qdarkstyle
from PyQt5 import QtGui, QtWidgets, QtCore
try:
from PyQt5 import QtGui, QtWidgets, QtCore
except ImportError:
from PySide2 import QtGui, QtWidgets, QtCore
QtCore.pyqtSignal = QtCore.Signal

from .mainwindow import MainWindow
from ..setting import SETTINGS
Expand Down

0 comments on commit 74a62a4

Please sign in to comment.