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 ClientThread class, the run function is overridden. In the run function, each client waits for data received from the server and displays that data in the Text Edit widget. A window class object is passed to the ServerThread class, which passes that object to ClientThread, which, in turn, uses it to access the content written in the Line Edit element.

The received data is decoded because the data received is in the form of bytes, which have to be converted into strings using UTF-8 encoding.

The demoClient.py file that we generated in the preceding section needs to be treated as a header file and needs to be imported into another Python file that will use the GUI of the header file and transmit data from the client to ...

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