دانلود کتاب Mastering GUI Programming with Python
by Alan D. Moore
|
عنوان فارسی: تسلط بر برنامه نویسی GUI با Python |
دانلود کتاب
جزییات کتاب
This book is for the intermediate Python programmer who wants to dig deep into the PyQt application framework and learn how to make powerful GUI applications. It is assumed that the reader knows the basics of Python syntax, features, and idioms such as functions, classes, and common standard library tools. It is also assumed the reader has an environment in which they are comfortable writing and executing Python code.
This book does not assume any prior knowledge of GUI development, other GUI toolkits, or other versions of PyQt.
~~~~~~~~~
What this book covers
Chapter 1, Getting Started with PyQt, introduces you to the Qt and PyQt libraries. You will learn how to set up your system for writing PyQt applications and be introduced to Qt Designer. You will also write the traditional Hello World application and develop a basic template for PyQt apps.
Chapter 2, Building Forms with QtWidgets, shows you the basics of making a PyQt GUI. You'll meet the most common input and display widgets, learn to arrange them using layouts, and learn how to validate user input. You'll put these skills into action developing a calendar GUI.
Chapter 3, Handling Events with Signals and Slots, focuses on PyQt's event handling and object communication system. You'll learn how to use this system to make your application respond to user input, and how to create custom signals and slots. You'll put these skills to work by completing your calendar application.
Chapter 4, Building Applications with QMainWindow, introduces you to the QMainWindow class, which forms the basis of our applications throughout the rest of the book. You'll also explore PyQt's standard dialog classes and the QSettings module for saving your app's configuration.
Chapter 5, Creating Data Interfaces with Model-View Classes, focuses on Qt's Model-View classes. You'll learn the principles of model-view design, explore the model-view classes in QtWidgets, and exercise your knowledge as we develop a CSV editor.
Chapter 6, Styling Qt Applications, explores the styling capabilities of PyQt widgets. You will spice up your GUI applications with custom fonts, images, and icons. You'll learn to customize colors using style objects and Qt style sheets. Finally, we'll learn how to do basic animations of style properties.
Chapter 7, Working with Audio-Visual Using QtMultimedia, explores the multimedia features of Qt. You will learn how to playback and record audio and video in a way that works seamlessly across platforms.
Chapter 8, Networking with QtNetwork, is focused on simple network communications using the QtNetwork library. You will learn to communicate over raw sockets, both Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), as well as learning to transmit and receive files and data using HTTP.
Chapter 9, Exploring SQL with QtSQL, introduces you to the world of SQL database programming. You will learn the basics of SQL and the SQLite database. You will then learn how your PyQt applications can use the QtSQL library to access data using raw SQL commands or Qt's SQL model-view classes.
Chapter 10, Multithreading with QTimer and QThread, addresses the world of multithreaded and asynchronous programming. You will learn to use timers to delay tasks on the event loop and learn how to push processes into a separate execution thread using QThread. You'll also learn how to do high-concurrency programming using QThreadPool.
Chapter 11, Creating Rich Text with QTextDocument, explores rich text and document preparation in Qt. You'll be introduced to Qt's rich text markup language, and learn how to build documents programmatically using QTextDocument. You'll also learn how to use Qt's printing libraries to enable document printing easily across platforms.
Chapter 12, Creating 2D Graphics with Qpainter, digs deep into two-dimensional graphics in Qt. You'll learn how to load and edit images and to create custom widgets. You'll also learn about drawing and animating with the Qt Graphics system, and create an arcade-style game.
Chapter 13, Creating 3D Graphics with QtOpenGL, introduces you to 3D graphics with OpenGL. You will learn the basics of modern OpenGL programming, and how to use PyQt widgets to display and interact with OpenGL drawings.
Chapter 14, Embedding Data Plots with QtCharts, explores Qt's built-in charting capabilities. You'll learn how to create both static and animated charts, and how to customize the colors, fonts, and styles of your charts.
Chapter 15, PyQt Raspberry Pi, focuses on the use of PyQt on the Raspberry Pi computer. You'll learn how to set up PyQt on Raspbian Linux, and how to combine the power of PyQt with the Raspberry Pi's GPIO pins to create GUI applications that interact with real-world circuitry.
Chapter 16, Web Browsing with QtWebEngine, looks at PyQt's Chromium-based web browser module. You'll explore the capabilities of this module as you build your own multi-tabbed web browser.
Chapter 17, Preparing your Software for Distribution, discusses various ways to prepare your code for sharing and distribution. We'll look at optimal project layout, packaging your source code for other Python users using setuptools, and building standalone executables using PyInstaller.
Appendix A, Answers to Questions, contains answers or suggestions for the questions at the end of each chapter.
Appendix B, Upgrading Raspbian 9 to Raspbian 10, explains how to upgrade a Raspberry Pi device from Raspbian 9 to Raspbian 10, for readers who are trying to follow the book before the official release of Raspbian 10.