From 82dd0d0ea64eced8eb4a385652f463ce91ae6025 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 3 Jul 2019 21:02:37 +0800 Subject: [PATCH] [Add] clear_button to clear log monitor --- vnpy/app/script_trader/ui/widget.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vnpy/app/script_trader/ui/widget.py b/vnpy/app/script_trader/ui/widget.py index 45358180..e143baa8 100644 --- a/vnpy/app/script_trader/ui/widget.py +++ b/vnpy/app/script_trader/ui/widget.py @@ -44,11 +44,16 @@ class ScriptManager(QtWidgets.QWidget): self.log_monitor = QtWidgets.QTextEdit() self.log_monitor.setReadOnly(True) + clear_button = QtWidgets.QPushButton("清空") + clear_button.clicked.connect(self.log_monitor.clear) + hbox = QtWidgets.QHBoxLayout() hbox.addWidget(self.strategy_line) hbox.addWidget(select_button) hbox.addWidget(start_button) hbox.addWidget(stop_button) + hbox.addStretch() + hbox.addWidget(clear_button) vbox = QtWidgets.QVBoxLayout() vbox.addLayout(hbox)