February 2019
Intermediate to advanced
450 pages
9h 59m
English
Let's write a simple application using our GUI library:
import sysfrom PySide2.QtWidgets import QApplication, QWidgetapp = QApplication(sys.argv)window = QWidget()window.resize(400, 400)window.show()sys.exit(app.exec_())
(qt-venv) $ python hello.py
You will now see a blank window:

Let's go through this file to better understand Qt for Python:
import sysfrom PySide2.QtWidgets import QApplication, QWidget
The sys import is from the standard Python library. This is required because we want to get the arguments from the command line when we ...
Read now
Unlock full access