Rapid GUI Programming with Python and Qt : The Definitive Guide to Pyqt Programming (Prentice Hall Open Source Software Development) (1ST)

Rapid GUI Programming with Python and Qt : The Definitive Guide to Pyqt Programming (Prentice Hall Open Source Software Development) (1ST)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Hardcover:ハードカバー版/ページ数 625 p.
  • 言語 ENG
  • 商品コード 9780132354189
  • DDC分類 005.12

Full Description


The Insider's Best-Practice Guide to Rapid PyQt 4 GUI DevelopmentWhether you're building GUI prototypes or full-fledged cross-platform GUI applications with native look-and-feel, PyQt 4 is your fastest, easiest, most powerful solution. Qt expert Mark Summerfield has written the definitive best-practice guide to PyQt 4 development.With Rapid GUI Programming with Python and Qt you'll learn how to build efficient GUI applications that run on all major operating systems, including Windows, Mac OS X, Linux, and many versions of Unix, using the same source code for all of them. Summerfield systematically introduces every core GUI development technique: from dialogs and windows to data handling; from events to printing; and more. Through the book's realistic examples you'll discover a completely new PyQt 4-based programming approach, as well as coverage of many new topics, from PyQt 4's rich text engine to advanced model/view and graphics/view programming. Every key concept is illuminated with realistic, downloadable examples-all tested on Windows, Mac OS X, and Linux with Python 2.5, Qt 4.2, and PyQt 4.2, and on Windows and Linux with Qt 4.3 and PyQt 4.3.Coverge includesPython basics for every PyQt developer: data types, data structures, control structures, classes, modules, and moreCore PyQt GUI programming techniques: dialogs, main windows, and custom file formatsUsing Qt Designer to design user interfaces, and to implement and test dialogs, events, the Clipboard, and drag-and-drop Building custom widgets: Widget Style Sheets, composite widgets, subclassing, and moreMaking the most of Qt 4.2's new graphics/view architectureConnecting to databases, executing SQL queries, and using form and table viewsAdvanced model/view programming: custom views, generic delegates, and moreImplementing online help, internationalizing applications, and using PyQt's networking and multithreading facilities

Contents

Foreword xiiiIntroduction 1Part ITypes and Data Structures 9Executing Python Code 10Variables and Objects 12Numbers and Strings 15Collections 29Built-in Functions 37Summary 41Exercises 42Chapter 2. Control Structures 45Conditional Branching 46Looping 49Functions 55Exception Handling 66Summary 72Exercises 72Chapter 3. Classes and Modules 75Creating Instances 77Methods and Special Methods 79Inheritance and Polymorphism 99Modules and Multifile Applications 104Summary 107Exercises 108Part II: Basic GUI Programming Chapter 4. Introduction to GUI Programming 111A Pop-Up Alert in 25 Lines 112An Expression Evaluator in 30 Lines 116A Currency Converter in 70 Lines 121Signals and Slots 127Summary 136Exercise 137Chapter 5. Dialogs 139Dumb Dialogs 141Standard Dialogs 147Smart Dialogs 154Summary 162Exercise 163Chapter 6. Main Windows 165Creating a Main Window 166Handling User Actions 190Summary 201Exercise 202Chapter 7. Using Qt Designer 205Designing User Interfaces 208Implementing Dialogs 216Testing Dialogs 221Summary 223Exercise 224Chapter 8. Data Handling and Custom File Formats 227Main Window Responsibilities 229Data Container Responsibilities 235Saving and Loading Binary Files 240Saving and Loading Text Files 249Saving and Loading XML Files 256Summary 265Exercise 266Part III: Intermediate GUI Programming Chapter 9. Layouts and Multiple Documents 269Layout Policies 270Tab Widgets and Stacked Widgets 272Splitters 280Single Document Interface(SDI) 283Multiple Document Interface(MDI) 290Summary 300Exercise 301Chapter 10. Events, the Clipboard, and Drag and Drop 303The Event-Handling Mechanism 303Reimplementing Event Handlers 305Using the Clipboard 310Drag and Drop 312Summary 317Exercise 318Chapter 11. Custom Widgets 321Using Widget Style Sheets 322Creating Composite Widgets 325Subclassing Built-in Widgets 326Subclassing QWidget 328Summary 345Exercise 346Chapter 12. Item-Based Graphics 349Custom and Interactive Graphics Items 351Animation and Complex Shapes 368Summary 378Exercise 379Chapter 13. Rich Text and Printing 381Rich Text Editing 382Printing Documents 398Summary 411Exercise 412Chapter 14. Model/View Programming 413Using the Convenience Item Widgets 415Creating Custom Models 423Creating Custom Delegates 436Summary 442Exercise 443Chapter 15. Databases 445Connecting to the Database 446Executing SQL Queries 446Using Database Form Views 451Using Database Table Views 457Summary 470Exercise 471Part IV: Advanced GUI Programming Chapter 16. Advanced Model/View Programming 475Custom Views 476Generic Delegates 483Representing Tabular Data in Trees 492Summary 505Exercise 505Chapter 17. Online Help and Internationalization 509Online Help 510Internationalization 512Summary 519Exercise 520Chapter 18. Networking 521Creating a TCP Client 523Creating a TCP Server 529Summary 534Exercise 534Chapter 19. Multithreading 537Creating a Threaded Server 539Creating and Managing Secondary Threads 544Implementing a Secondary Thread 552Summary 557Exercise 558This Is Not Quite the End 559Appendix A. Installing 561Appendix B. Selected PyQt Widgets 575Appendix C. Selected PyQt Class Hierarchies 581Index 585

最近チェックした商品