-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathQT1.py
More file actions
156 lines (122 loc) · 5.78 KB
/
Copy pathQT1.py
File metadata and controls
156 lines (122 loc) · 5.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
import sys
import time
import yt_dlp
from PyQt5.uic import loadUiType
ui,_ = loadUiType('Qt.ui')
class MainApp(QMainWindow , ui):
def __init__(self , parent=None):
super(MainApp , self).__init__(parent)
QMainWindow.__init__(self)
self.setupUi(self)
self.radioButton_1.clicked.connect(self.show_the_response1)
self.radioButton_2.clicked.connect(self.show_the_response2)
self.radioButton_3.clicked.connect(self.show_the_response3)
self.pushButton.clicked.connect(self.change_tab1)
self.pushButton_2.clicked.connect(self.show_infos)
self.radioButton_4.clicked.connect(self.show_the_response4)
self.radioButton_10.clicked.connect(self.show_the_response5)
self.radioButton_9.clicked.connect(self.show_the_response6)
self.pushButton_5.clicked.connect(self.change_tab2)
self.pushButton_6.clicked.connect(self.change_tab3)
self.pushButton_4.clicked.connect(self.change_tab4)
self.pushButton_3.clicked.connect(self.change_tab5)
self.radioButton_5.clicked.connect(self.show_the_response7)
self.radioButton_11.clicked.connect(self.show_the_response8)
self.radioButton_12.clicked.connect(self.show_the_response9)
self.pushButton_7.clicked.connect(self.change_tab6)
self.pushButton_8.clicked.connect(self.change_tab7)
self.radioButton_6.clicked.connect(self.show_the_response10)
self.radioButton_13.clicked.connect(self.show_the_response11)
self.radioButton_14.clicked.connect(self.show_the_response12)
self.pushButton_10.clicked.connect(self.change_tab8)
self.radioButton_15.clicked.connect(self.show_the_response13)
self.radioButton_8.clicked.connect(self.show_the_response14)
self.radioButton_7.clicked.connect(self.show_the_response15)
self.pushButton_12.clicked.connect(self.change_tab9)
self.score = 0
self.label_6.setText(f"Score : {self.score}")
self.pushButton_11.clicked.connect(self.change_tab10)
self.pushButton_14.clicked.connect(self.show_final_score)
self.pushButton_15.clicked.connect(self.return_home)
self.pushButton_16.clicked.connect(self.show_emojis)
def show_the_response1(self):
self.lineEdit_3.setText("La réponse est fausse")
def show_the_response2(self):
self.lineEdit_3.setText("La réponse est correcte")
self.score += 1
self.label_5.setText(f"Score : {self.score}")
def show_the_response3(self):
self.lineEdit_3.setText("La réponse est fausse")
def change_tab1(self):
self.tabWidget.setCurrentIndex(1)
def show_infos(self):
self.lineEdit_7.setText("A était dévellopper grâce à : VSC, Python et QTdesigner")
def show_the_response4(self):
self.lineEdit_11.setText("La réponse est fausse")
def show_the_response5(self):
self.lineEdit_11.setText("La réponse est correcte")
self.score += 1
self.label_4.setText(f"Score : {self.score}")
def show_the_response6(self):
self.lineEdit_11.setText("La réponse est fausse")
def change_tab2(self):
self.tabWidget.setCurrentIndex(0)
def change_tab3(self):
self.tabWidget.setCurrentIndex(2)
def change_tab4(self):
self.tabWidget.setCurrentIndex(1)
def change_tab5(self):
self.tabWidget.setCurrentIndex(3)
def show_the_response7(self):
self.lineEdit_17.setText("La réponse est fausse")
def show_the_response8(self):
self.lineEdit_17.setText("La réponse est correcte")
self.score += 1
self.label_3.setText(f"Score : {self.score}")
def show_the_response9(self):
self.lineEdit_17.setText("La réponse est fausse")
def change_tab6(self):
self.tabWidget.setCurrentIndex(2)
def change_tab7(self):
self.tabWidget.setCurrentIndex(4)
def show_the_response10(self):
self.lineEdit_20.setText("La réponse est correcte")
self.score += 1
self.label_2.setText(f"Score : {self.score}")
def show_the_response11(self):
self.lineEdit_20.setText("La réponse est fausse")
def show_the_response12(self):
self.lineEdit_20.setText("La réponse est fausse")
def change_tab8(self):
self.tabWidget.setCurrentIndex(5)
def show_the_response13(self):
self.lineEdit_23.setText("La réponse est fausse")
def show_the_response14(self):
self.lineEdit_23.setText("La réponse est fausse")
def show_the_response15(self):
self.lineEdit_23.setText("La réponse est correcte")
self.score += 1
self.label.setText(f"Score : {self.score}")
def change_tab9(self):
self.tabWidget.setCurrentIndex(4)
def reset_score(self):
self.score = 0
self.label_6.setText(f"Score : {self.score}")
def change_tab10(self):
self.tabWidget.setCurrentIndex(6)
def show_final_score(self):
QMessageBox.information(self, "Score Final", f"Votre score final est : {self.score}/5")
def return_home(self):
self.tabWidget.setCurrentIndex(0)
def show_emojis(self):
self.lineEdit_5.setText("👋✨🙏💫🛸🎩🪩🦄🌈🚀🎉🥹🌍👑🕊️💌🎶💭📚🎠🍍👽🖖🌞🕺🍕🐙🎭📦🚪🌜🎇🧃🎈💖🧤🍀🤸♂️🎺🌌🎓🧠🐉💃📞💿🔚🥲🦉🎁🌬️⛅💬🧊💍🧞♂️🛤️🫶🍉🎷🐬✨🧩🍄🪐🕰️🧣🏝️🎏🌟📀🎭🎬🧸🫧🧼🖍️🪄🎠🎊🌠🐾🎐🧳🕸️🕹️🌪️🛶🍰📼🎯🎨👑🪅🦕🎤🍭🖼️🏁🪞")
def main():
app = QApplication(sys.argv)
window = MainApp()
window.show()
app.exec_()
if __name__ == '__main__':
main()