February 2019
Intermediate to advanced
450 pages
9h 59m
English
Let's create a script to show more varieties of widgets. To begin, name the script hello_varieties.py. Refer to the code file in the following GitLab link for the full code: https://gitlab.com/arjunaskykok/hands-on-blockchain-for-python-developers/blob/master/chapter_07/crash_course_qt_for_python/hello_varieties.py.
The content of the script can be viewed in the following code block:
import sysfrom PySide2.QtWidgets import (QApplication, QWidget, QVBoxLayout, QHBoxLayout, QGroupBox, QPushButton, QLabel, QSpinBox, QLineEdit, QRadioButton, QComboBox)......window = QWidget()window.setLayout(layout)window.show()sys.exit(app.exec_())
Let's dissect the code line by line. We start by importing libraries using the following lines: