Merge pull request #1899 from vnpy/dev

[Add] clear_button to clear log monitor
This commit is contained in:
vn.py 2019-07-03 21:12:05 +08:00 committed by GitHub
commit d03f0a4a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,11 +44,16 @@ class ScriptManager(QtWidgets.QWidget):
self.log_monitor = QtWidgets.QTextEdit() self.log_monitor = QtWidgets.QTextEdit()
self.log_monitor.setReadOnly(True) self.log_monitor.setReadOnly(True)
clear_button = QtWidgets.QPushButton("清空")
clear_button.clicked.connect(self.log_monitor.clear)
hbox = QtWidgets.QHBoxLayout() hbox = QtWidgets.QHBoxLayout()
hbox.addWidget(self.strategy_line) hbox.addWidget(self.strategy_line)
hbox.addWidget(select_button) hbox.addWidget(select_button)
hbox.addWidget(start_button) hbox.addWidget(start_button)
hbox.addWidget(stop_button) hbox.addWidget(stop_button)
hbox.addStretch()
hbox.addWidget(clear_button)
vbox = QtWidgets.QVBoxLayout() vbox = QtWidgets.QVBoxLayout()
vbox.addLayout(hbox) vbox.addLayout(hbox)