-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformBiodata.py
28 lines (23 loc) · 865 Bytes
/
formBiodata.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
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.uic import loadUi
class MainForm(QDialog):
def __init__(self, parent=None):
QDialog.__init__(self,parent)
loadUi('/Users/muhammadsaipulrohman/Documents/IDB/source_code/qtDesigner/biodataLengkap.ui',self)
self.btnSimpan.clicked.connect(self.btnSimpanClick)
self.btnBatal.clicked.connect(self.btnBatalClick)
def btnSimpanClick(self):
self.listWidget.addItem(
self.txtNama.text() + ' - ' + self.txtNomorHp.text() +
' - ' + self.txtEmail.text() + ' - ' + self.txtAlamat.toPlainText() + ' - ' +
self.txtJenKel.text()
)
def btnBatalClick(self):
QApplication.quit()
if __name__ == "__main__":
a = QApplication(sys.argv)
form = MainForm()
form.show()
a.exec_()