We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5edeecb commit 4d4be3cCopy full SHA for 4d4be3c
QtTest.py
@@ -3,14 +3,10 @@
3
4
def resource_path(relative_path):
5
""" Get absolute path to resource, works for dev and for PyInstaller """
6
- try:
7
- # PyInstaller creates a temp folder and stores path in _MEIPASS
8
- base_path = sys._MEIPASS
9
- except Exception:
10
- base_path = os.path.abspath(".")
11
-
+ base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
12
return os.path.join(base_path, relative_path)
13
+
14
class MainWindow(QtWidgets.QMainWindow):
15
16
def __init__(self, *args, **kwargs):
@@ -90,7 +86,6 @@ def keyPressEvent(self, a0: QtGui.QKeyEvent):
90
86
16777221: self.BtnEqual,
91
87
16777223: self.BtnClear,
92
88
}
93
- print(Button.get(key))
94
89
if (Button.get(key)!=None):
95
Button.get(key).click()
96
0 commit comments