May 2019
Intermediate to advanced
542 pages
13h 37m
English
Get a fresh copy of our PyQt application template and call it invoice_maker.py. We'll begin our application by creating the GUI elements, and then develop the method that will actually build the document.
Start your script with a data entry form class, as follows:
class InvoiceForm(qtw.QWidget): submitted = qtc.pyqtSignal(dict) def __init__(self): super().__init__() self.setLayout(qtw.QFormLayout()) self.inputs = dict() self.inputs['Customer Name'] = qtw.QLineEdit() self.inputs['Customer Address'] = qtw.QPlainTextEdit() self.inputs['Invoice Date'] = qtw.QDateEdit( date=qtc.QDate.currentDate(), calendarPopup=True) self.inputs['Days until Due'] = qtw.QSpinBox( minimum=0, maximum=60, value=30) for label, ...
Read now
Unlock full access