[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())
|
symbol = str(self.symbol_line.text())
|
||||||
if not symbol:
|
if not symbol:
|
||||||
QtWidgets.QMessageBox.critical("委托失败", "请输入合约代码")
|
QtWidgets.QMessageBox.critical(self, "委托失败", "请输入合约代码")
|
||||||
return
|
return
|
||||||
|
|
||||||
volume_text = str(self.volume_line.text())
|
volume_text = str(self.volume_line.text())
|
||||||
if not volume_text:
|
if not volume_text:
|
||||||
QtWidgets.QMessageBox.critical("委托失败", "请输入委托数量")
|
QtWidgets.QMessageBox.critical(self, "委托失败", "请输入委托数量")
|
||||||
return
|
return
|
||||||
volume = float(volume_text)
|
volume = float(volume_text)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user