Computer Science, asked by ferishampatel, 2 months ago

import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

class Window(QWidget):
def __init__(self):
super().__init__()
self.resize(300,500)
self.setWindowTitle('Customer Information')
self.initUI()

def initUI(self):

#create QFormLayout
self.layout = QFormLayout()

#Add Widget
#First Row
self.lblTitle = QLabel("Customer Information")
self.lblTitle.resize(300,1)
font = self.lblTitle.font()
font.setPointSize(25)
self.lblTitle.setFont(font)
self.lblTitle.setAlignment(Qt.AlignCenter)
self.layout.addRow(self.lblTitle)

#Second Row
self.accType = QComboBox()
type = ["Select account type","Saving","Current"]
self.accType.setEditable(True)
self.accType.addItems(type)
self.layout.addRow("Account Type: ",self.accType)

#Third Row
self.txtFullName = QLineEdit()
self.txtFullName.setClearButtonEnabled(True)
self.layout.addRow("Full Name: ",self.txtFullName)

#Fourth Row
self.dob = QDateEdit(self)
self.dob.setDateTime(QDateTime.currentDateTime())
self.dob.setMaximumDate(QDate(7999, 12, 28))
self.dob.setMaximumTime(QTime(23, 59, 59))
self.dob.setCalendarPopup(True)
self.layout.addRow("Date of Birth: ", self.dob)

#Fifth Row
hbox = QHBoxLayout()
r1 = QRadioButton("Male")
r2 = QRadioButton("Female")
r1.setChecked(True)
hbox.addWidget(r1)
hbox.addWidget(r2)
hbox.addStretch()
self.layout.addRow("Gender: ", hbox)

#Sixth Row
self.txtAddress = QLineEdit()
self.txtAddress.setClearButtonEnabled(True)
self.layout.addRow("Address: ", self.txtAddress)

#Seventh Row
self.mobileNo = QLineEdit()
self.mobileNo.setInputMask('+99_99999_99999')
self.layout.addRow("Mobile Number: ", self.mobileNo)

#Eighth Row
self.txtEmail = QLineEdit()
self.txtEmail.setClearButtonEnabled(True)
self.layout.addRow("Email: ", self.txtEmail)

#Ninth Row
self.txtPAN = QLineEdit()
self.txtPAN.setClearButtonEnabled(True)
self.layout.addRow("PAN No: ", self.txtPAN)

#Tenth Row
self.btnOK = QPushButton("Submit")
self.layout.addRow("", self.btnOK)

#Twelth Row
self.accNumber = QLineEdit()
self.accNumber.setInputMask('99999999')
self.layout.addRow("Account Number: ", self.accNumber)

self.setLayout(self.layout)
self.show()


def main():

app = QApplication(sys.argv)
ex = Window()
sys.exit(app.exec_())


if __name__ == '__main__':
main()​

Answers

Answered by anjalikumari21
0

Answer:

it's very long question ❓❓❓❓❓❓❓❓❓❓❓

Explanation:

nkxjkfjfkfjfkfkfjfkfkfncmcmfmfmfmfmfm

Answered by seetujsoni
0

Answer:

sefjzadhknvcthjvnfsh

Similar questions