Skip to Main Content
Qt5 Python GUI Programming Cookbook
book

Qt5 Python GUI Programming Cookbook

by B. M. Harwani
July 2018
Intermediate to advanced content levelIntermediate to advanced
462 pages
12h 2m
English
Packt Publishing
Content preview from Qt5 Python GUI Programming Cookbook

How it works...

In the callProgressBarTwoThreads.pyw file, there are two classes: one is the main class, called the MyForm class, which basically interacts with the GUI form, and the second class is the myThread class, which creates and invokes two threads, which in turn update the two Progress Bar widgets used in the GUI. Recall, the two progress bars are defined in the GUI to represent progress in downloading a file and scanning for viruses.

When using threads in Python, the first step is to import Thread. The import threading statement imports Thread in the current script. After importing Thread, the second step is to subclass our class from the Thread class. Hence, our class called myThread inherits the Thread class.

In the main section ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python GUI Programming Cookbook - Third Edition

Python GUI Programming Cookbook - Third Edition

Burkhard Meier

Publisher Resources

ISBN: 9781788831000Supplemental Content