May 2019
Intermediate to advanced
542 pages
13h 37m
English
We'll begin styling our Qt application by customizing the application's fonts, displaying some static images, and including dynamic icons. However, before we can do this, we'll need to create a graphical user interface (GUI) that we can work with. We'll create a game lobby dialog, which will be used for logging into an imaginary multiplayer game called Fight Fighter.
To do this, open a fresh copy of your application template and add the following GUI code to MainWindow.__init__():
self.setWindowTitle('Fight Fighter Game Lobby') cx_form = qtw.QWidget() self.setCentralWidget(cx_form) cx_form.setLayout(qtw.QFormLayout()) heading = qtw.QLabel("Fight Fighter!") cx_form.layout().addRow(heading) inputs = { 'Server': ...Read now
Unlock full access