From e73c12d7d5f2a645675292e9cd46d9395c238c82 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 19 Apr 2019 22:49:36 +0800 Subject: [PATCH] [Mod]disable edit in result monitor table --- vnpy/app/cta_backtester/ui/widget.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vnpy/app/cta_backtester/ui/widget.py b/vnpy/app/cta_backtester/ui/widget.py index ac9ff738..74eddac9 100644 --- a/vnpy/app/cta_backtester/ui/widget.py +++ b/vnpy/app/cta_backtester/ui/widget.py @@ -342,6 +342,7 @@ class StatisticsMonitor(QtWidgets.QTableWidget): self.horizontalHeader().setSectionResizeMode( QtWidgets.QHeaderView.Stretch ) + self.setEditTriggers(self.NoEditTriggers) for row, key in enumerate(self.KEY_NAME_MAP.keys()): cell = QtWidgets.QTableWidgetItem() @@ -704,6 +705,7 @@ class OptimizationResultMonitor(QtWidgets.QDialog): table.setColumnCount(2) table.setRowCount(len(self.result_values)) table.setHorizontalHeaderLabels(["参数", self.target_display]) + table.setEditTriggers(table.NoEditTriggers) table.verticalHeader().setVisible(False) table.horizontalHeader().setSectionResizeMode(