May 2019
Intermediate to advanced
542 pages
13h 37m
English
Now that our coffee list is in good shape, it's time to deal with the coffee form, which will allow us to display and edit the details of individual products and their reviews
Let's start with the GUI code for the coffee details part of the form:
class CoffeeForm(qtw.QWidget): def __init__(self, coffees_model, reviews_model): super().__init__() self.setLayout(qtw.QFormLayout()) self.coffee_brand = qtw.QLineEdit() self.layout().addRow('Brand: ', self.coffee_brand) self.coffee_name = qtw.QLineEdit() self.layout().addRow('Name: ', self.coffee_name) self.roast = qtw.QComboBox() self.layout().addRow('Roast: ', self.roast)
This section of the form is the exact same information that we displayed in the coffee list, except now we're ...
Read now
Unlock full access