[Fix] missing parent when using QMessageBox.critical
This commit is contained in:
parent
9557534eaf
commit
fb4d7c9c01
@ -824,12 +824,12 @@ class TradingWidget(QtWidgets.QWidget):
|
||||
"""
|
||||
symbol = str(self.symbol_line.text())
|
||||
if not symbol:
|
||||
QtWidgets.QMessageBox.critical("委托失败", "请输入合约代码")
|
||||
QtWidgets.QMessageBox.critical(self, "委托失败", "请输入合约代码")
|
||||
return
|
||||
|
||||
volume_text = str(self.volume_line.text())
|
||||
if not volume_text:
|
||||
QtWidgets.QMessageBox.critical("委托失败", "请输入委托数量")
|
||||
QtWidgets.QMessageBox.critical(self, "委托失败", "请输入委托数量")
|
||||
return
|
||||
volume = float(volume_text)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user