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...

The triggered() signal of the action of each menu item is connected to its respective method. The triggered() signal of the actionDraw_Circle menu item is connected to the drawCircle() method, so that whenever the Draw Circle menu item is selected from the menu bar, the drawCircle() method will be invoked. Similarly, the triggered() signal of the actionDraw_Rectangle and actionDraw_Line menus are connected to the drawRectangle() and drawLine() methods respectively. In the drawCircle() method, the toDraw variable is assigned a string, circle. The toDraw variable will be used to determine the graphics to be drawn in the paintEvent method. The toDraw variable can be assigned any of the three strings, line, circle, or rectangle ...

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