File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 7
7
from PyQt5 .uic import loadUi
8
8
import sys
9
9
width = 401
10
- height = 398
11
- class Window (QWidget ):
10
+ height = 407
11
+ class Window (QMainWindow ):
12
12
result = 0
13
13
def __init__ (self ):
14
14
super (Window ,self ).__init__ ()
@@ -36,7 +36,7 @@ def __init__(self):
36
36
37
37
self ._result .clicked .connect (self .result )
38
38
self .clear .clicked .connect (self .clear_text )
39
-
39
+ self . create_statusbar ()
40
40
def result (self ):
41
41
text = self .line .text ()
42
42
print (text )
@@ -113,7 +113,11 @@ def error_message(self):
113
113
mess .setDetailedText ("Calculator Error" )
114
114
mess .setStandardButtons (QMessageBox .Ok )
115
115
res = mess .exec_ ()
116
-
116
+
117
+ def create_statusbar (self ):
118
+ status = QStatusBar ()
119
+ status .showMessage ("Calculator v1.0" )
120
+ self .setStatusBar (status )
117
121
def main ():
118
122
app = QApplication (sys .argv )
119
123
app .setApplicationName ("ماشین حساب" )
@@ -125,6 +129,5 @@ def main():
125
129
sys .exit (app .exec_ ())
126
130
127
131
if __name__ == "__main__" :
128
- # Calculator v1.0
129
132
main ()
130
133
You can’t perform that action at this time.
0 commit comments