forked from M-Labs/thermostat
Add exit option in connection menu
This commit is contained in:
parent
7c1293e3d2
commit
98d491203f
@ -343,6 +343,15 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.connection_menu.addAction(port)
|
||||
self.connection_menu.port = port
|
||||
|
||||
self.exit_button = QtWidgets.QPushButton()
|
||||
self.exit_button.setText("Exit")
|
||||
self.exit_button.pressed.connect(QtWidgets.QApplication.instance().quit)
|
||||
|
||||
exit_action = QtWidgets.QWidgetAction(self.exit_button)
|
||||
exit_action.setDefaultWidget(self.exit_button)
|
||||
self.connection_menu.addAction(exit_action)
|
||||
self.connection_menu.exit_action = exit_action
|
||||
|
||||
self.connect_btn.setMenu(self.connection_menu)
|
||||
|
||||
def _set_up_thermostat_menu(self):
|
||||
|
Loading…
Reference in New Issue
Block a user