May 2019
Intermediate to advanced
542 pages
13h 37m
English
The Captain's Log application will allow us to record videos from a webcam to a timestamped file in a preset directory and play them back. Our interface will feature a list of past logs on the right and a preview/playback area on the left. We'll have a tabbed interface so that the user can swap between playback and recording mode.
Inside MainWindow.__init__(), start laying out the basic GUI as follows:
base_widget = qtw.QWidget() base_widget.setLayout(qtw.QHBoxLayout()) notebook = qtw.QTabWidget() base_widget.layout().addWidget(notebook) self.file_list = qtw.QListWidget() base_widget.layout().addWidget(self.file_list) self.setCentralWidget(base_widget)
Next, we'll add a toolbar to hold the transport controls:
toolbar ...
Read now
Unlock full access