- Esc to close popup windows.

pull/23/head
Rune B. Broberg 2019-09-21 13:13:33 +02:00
rodzic fd7ce9faf6
commit c0ed1ecee6
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ import collections
import logging
import math
from PyQt5 import QtWidgets
from PyQt5 import QtWidgets, QtCore
from typing import List
import numpy as np
@ -38,6 +38,9 @@ class CalibrationWindow(QtWidgets.QWidget):
self.setMinimumSize(600, 320)
self.setWindowTitle("Calibration")
shortcut = QtWidgets.QShortcut(QtCore.Qt.Key_Escape, self, self.hide)
top_layout = QtWidgets.QHBoxLayout()
left_layout = QtWidgets.QVBoxLayout()
right_layout = QtWidgets.QVBoxLayout()

Wyświetl plik

@ -370,6 +370,7 @@ class NanoVNASaver(QtWidgets.QWidget):
self.fileWindow = QtWidgets.QWidget()
self.fileWindow.setWindowTitle("Files")
shortcut = QtWidgets.QShortcut(QtCore.Qt.Key_Escape, self.fileWindow, self.fileWindow.hide)
file_window_layout = QtWidgets.QVBoxLayout()
self.fileWindow.setLayout(file_window_layout)
@ -982,6 +983,8 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
self.app = app
self.setWindowTitle("Display settings")
shortcut = QtWidgets.QShortcut(QtCore.Qt.Key_Escape, self, self.hide)
layout = QtWidgets.QVBoxLayout()
self.setLayout(layout)
@ -1276,6 +1279,8 @@ class TDRWindow(QtWidgets.QWidget):
self.setWindowTitle("TDR")
shortcut = QtWidgets.QShortcut(QtCore.Qt.Key_Escape, self, self.hide)
layout = QtWidgets.QFormLayout()
self.setLayout(layout)
@ -1385,6 +1390,8 @@ class SweepSettingsWindow(QtWidgets.QWidget):
self.app = app
self.setWindowTitle("Sweep settings")
shortcut = QtWidgets.QShortcut(QtCore.Qt.Key_Escape, self, self.hide)
layout = QtWidgets.QFormLayout()
self.setLayout(layout)