forked from febryardiansyah/al-quran-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetail_dialog.py
64 lines (47 loc) · 2 KB
/
detail_dialog.py
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
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(QtWidgets.QWidget):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(633, 446)
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(20, 10, 81, 16))
self.label.setObjectName("label")
self.listWidget = QtWidgets.QListWidget(Dialog)
self.listWidget.setGeometry(QtCore.QRect(20, 70, 591, 381))
self.listWidget.setObjectName("listWidget")
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(20, 40, 91, 16))
self.label_2.setObjectName("label_2")
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setGeometry(QtCore.QRect(510, 10, 113, 32))
self.pushButton.setObjectName("pushButton")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
self.pushButton.clicked.connect(self.closeFun)
def closeFun(self):
print('close')
self.close()
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label.setText(_translate("Dialog",'Nama Surat'))
self.label_2.setText(_translate("Dialog", "Arti Indonesia"))
self.pushButton.setText(_translate("Dialog", "Close"))
def getSurat(self,data):
suratList = data['ayahs']
print(data['englishName'])
englishName = str(data['englishName'])
self.label.setText(englishName) ##yg ini gk bisa di set
for item in suratList:
self.listWidget.addItem(item['text']['arab']) ##sama ini
print('%d\n', item['text']['arab'])
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())
ui.close()
self.close()