Rapid Gui Programming With Python and QT: The Definitive Guide To Pyqt Programming
Rapid Gui Programming With Python and QT: The Definitive Guide To Pyqt Programming
Mark Summerfield
••.••
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
• •
New York • Toronto • Montreal • London • Munich • Paris • Madrid
PRENTICE
HALL Capetown • Sydney • Tokyo • Singapore • Mexico City
Contents
Foreword xiii
Introduction 1
vii
Summary 72
Exercises 72
viii
Creating and Using Actions 174
Restoring and Saving the Main Window's State 181
Handling User Actions 190
Handling File Actions 191
Handling Edit Actions 197
Handling Help Actions 200
Summary 201
Exercise 202
ix
Multiple Document Interface (MDI) 290
Summary 300
Exercise 301
Chapter 10. Events, the Clipboard, and Drag and Drop 303
The Event-Handling Mechanism 303
Reimplementing Event Handlers 305
Using the Clipboard 310
Drag and Drop 312
Handling Custom Data 313
Summary 317
Exercise 318
x
Chapter 14. Model/View Programming 413
Using the Convenience Item Widgets 415
Creating Custom Models 423
Implementing the View Logic 424
Implementing the Custom Model 427
Creating Custom Delegates 436
Summary 442
Exercise 443
xi
Chapter 19. Multithreading 537
Creating a Threaded Server 539
Creating and Managing Secondary Threads 544
Implementing a Secondary Thread 552
Summary 557
Exercise 558
This Is Not Quite the End 559
Index 585
xii