# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'C:\Users\atulk\OneDrive\Desktop\python Bootcamp\pyqt\basics.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1040, 829)
        self.label = QtWidgets.QLabel(Form)
        self.label.setGeometry(QtCore.QRect(360, 55, 361, 51))
        self.label.setStyleSheet("font: 20pt \"MS Shell Dlg 2\";\n"
"color: rgb(0, 0, 255);")
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setGeometry(QtCore.QRect(200, 180, 141, 41))
        self.label_2.setStyleSheet("font: 16pt \"MS Shell Dlg 2\";color:rgb(0, 85, 255)")
        self.label_2.setObjectName("label_2")
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setGeometry(QtCore.QRect(200, 270, 121, 41))
        self.label_3.setStyleSheet("font: 16pt \"MS Shell Dlg 2\";color:rgb(0, 0, 255);")
        self.label_3.setObjectName("label_3")
        self.txtfirstname = QtWidgets.QLineEdit(Form)
        self.txtfirstname.setGeometry(QtCore.QRect(360, 180, 331, 41))
        self.txtfirstname.setStyleSheet("font: 14pt \"MS Shell Dlg 2\";\n"
"color:rgb(0, 85, 255)")
        self.txtfirstname.setObjectName("txtfirstname")
        self.txtlastname = QtWidgets.QLineEdit(Form)
        self.txtlastname.setGeometry(QtCore.QRect(360, 270, 331, 41))
        self.txtlastname.setStyleSheet("font: 14pt \"MS Shell Dlg 2\";\n"
"color:rgb(0, 85, 255)")
        self.txtlastname.setObjectName("txtlastname")
        self.btnsubmit = QtWidgets.QPushButton(Form)
        self.btnsubmit.setGeometry(QtCore.QRect(360, 360, 331, 41))
        self.btnsubmit.setStyleSheet("font: 14pt \"MS Shell Dlg 2\";\n"
"color: rgb(0, 85, 255);")
        self.btnsubmit.setObjectName("btnsubmit")
        self.lblmessage = QtWidgets.QLabel(Form)
        self.lblmessage.setGeometry(QtCore.QRect(360, 475, 331, 61))
        self.lblmessage.setStyleSheet("font: 14pt \"MS Shell Dlg 2\";\n"
"color:rgb(0, 85, 255)")
        self.lblmessage.setText("")
        self.lblmessage.setObjectName("lblmessage")
        self.btnsubmit.clicked.connect(self.Addnames)
        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Pyqt5-basics"))
        self.label.setText(_translate("Form", "Welcome to pyqt5 Basics"))
        self.label_2.setText(_translate("Form", "Firstname  "))
        self.label_3.setText(_translate("Form", "Lastname :"))
        self.btnsubmit.setText(_translate("Form", "SUBMIT"))
    
    def Addnames(self):
        firstname = self.txtfirstname.text()
        lastname = self.txtlastname.text()
        fullname = firstname + " " + lastname
        self.lblmessage.setText(fullname)

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Form = QtWidgets.QWidget()
    ui = Ui_Form()
    ui.setupUi(Form)
    Form.show()
    sys.exit(app.exec_())
