May 2019
Intermediate to advanced
542 pages
13h 37m
English
First, make a fresh copy of the application template and call it soundboard.py. Then, import QtMultimedia as you did for the last project, and let's layout the main interface.
Inside the MainWindow constructor, add in the following code:
rows = 3 columns = 3 soundboard = qtw.QWidget() soundboard.setLayout(qtw.QGridLayout()) self.setCentralWidget(soundboard) for c in range(columns): for r in range(rows): sw = SoundWidget() soundboard.layout().addWidget(sw, c, r)
All we're doing here is creating an empty central widget, adding a grid layout, and then filling it with 3 rows and 3 columns of SoundWidget objects.
Read now
Unlock full access