PySide6 Blueprints

PySide6 Blueprints

Uros Calakovic
This is a sample of the book's content.Buy on Leanpub

Table of Contents

PySide6 Blueprints

  • 1. Getting Started
    • 1.1 Installation
    • 1.2 Qt Widgets
    • 1.3 Hello World
    • 1.4 Hello World Again
  • 2. Signals & Slots
    • 2.1 Basic Signals & Slots Mechanism
    • 2.2 Using Python Lambda Functions
  • 3. Qt Widgets Layouts
    • 3.1 Laying out Widgets Vertically - QVBoxLayout
    • 3.2 Horizontal Layout - QHBoxLayout
    • 3.3 Grid Layout - QGridLayout
    • 3.4 Form Layout - QFormLayout
  • 4. Display Widgets
    • 4.1 Displaying Text with QLabel
    • 4.2 Displaying Images with Qlabel
    • 4.3 Displaying LCD-like Numbers with QLCDNumber
  • 5. Qt Widgets Buttons
    • 5.1 QPushButton
    • 5.2 QCheckBox
    • 5.3 QRadioButton
  • 6. Numeric Widgets
    • 6.1 QSpinBox
    • 6.2 QDoubleSpinBox
    • 6.3 QSlider
    • 6.4 QDial
  • 7. Text Widgets
    • 7.1 QLineEdit
    • 7.2 QTextEdit
    • 7.3 QPlainTextEdit
  • 8. List Widgets
    • 8.1 QComboBox
    • 8.2 QListWidget
    • 8.3 QListView
  • 9. Table Widgets
    • 9.1 QTableWidget
    • 9.2 QTableView
  • 10. Tree Widgets
    • 10.1 QTreeWidget
    • 10.2 QTreeView
    • 10.3 Lazy-loading Trees
  • 11. Containers
    • 11.1 QGroupBox
    • 11.2 QScrollArea
    • 11.3 QToolBox
    • 11.4 QTabWidget
    • 11.5 QSplitter
  • 12. Building Complex UIs with QMainWindow
    • 12.1 Setting Up the Central Widget
    • 12.2 Adding a Status Bar
    • 12.3 Creating Menus and Actions
    • 12.4 Adding Toolbars
    • 12.5 Using Dock Widgets
    • 12.6 Completing the Editor
  • 13. Dialogs
    • 13.1 Standard Message Dialogs with QMessageBox
    • 13.2 Input Dialogs with QInputDialog
    • 13.3 File Dialogs with QFileDialog
    • 13.4 Color Selection with QColorDialog
    • 13.5 Font Selection with QFontDialog
    • 13.6 Creating Custom Dialogs by Subclassing QDialog
  • 14. Specialized Widgets
    • 14.1 QDateTimeEdit
    • 14.2 QCalendarWidget
    • 14.3 QKeySequenceEdit
    • 14.4 QFontComboBox
  • 15. Multimedia & Visualization Widgets
  • 16. Creating Custom Widgets
    • 16.1 Subclassing QWidget – The Minimal Example
    • 16.2 Painting with QPainter and paintEvent
    • 16.3 Handling Mouse and Keyboard Events
    • 16.4 Size Hints, Size Policies, and Layout Integration
    • 16.5 Adding Custom Properties and Signals
    • 16.6 A Real-World Example: Circular Progress Widget
    • 16.7 Packaging and Reusing Your Custom Widget
  • 17. Object Trees and Ownership
    • 17.1 Parent-Child Relationships
    • 17.2 Reparenting Qt Objects
    • 17.3 Finding Qt Object Children
    • 17.4 Manual Ownership Transfer
  • 18. More Signals & Slots
    • 18.1 A Common Pitfall
    • 18.2 Custom Signals
    • 18.3 Signal Blocking
    • 18.4 Connection Objects
    • 18.5 Connecting Multiple Slots with a Signal
    • 18.6 Disconnecting
  • 19. Events
    • 19.1 Event Handlers
    • 19.2 Object Event Filters
    • 19.3 Application-Wide Event Filters
    • 19.4 Event Propagation
    • 19.5 Custom Events
  • 20. Timers
    • 20.1 Single-Shot
    • 20.2 Starting and Stopping a Timer
    • 20.3 Adjusting a Timer Interval
    • 20.4 Countdown Timer
    • 20.5 Stopwatch
  • 21. Properties
    • 21.1 Declaring Basic Properties
    • 21.2 Properties Notification and Reset
    • 21.3 Constant and Non-Stored Properties
    • 21.4 Dynamic Properties for Validation-Based Styling
    • 21.5 Animating Custom Properties
    • 21.6 Inspecting Properties with QMetaObject
  • 22. Model-View Programming with QAbstractListModel
    • 22.1 Read-only List Model
    • 22.2 Editable List Model
    • 22.3 Editable List Model with Data-Widget Mapping
    • 22.4 Resizable List Model
  • 23. Model-View Programming with QAbstractTableModel
    • 23.1 Basic Read-Only Table Model
    • 23.2 Making the Table Model Editable
    • 23.3 Using Data Widget Mapper with Table Models
    • 23.4 Resizable Table Model
  • 24. Model-View Programming with QAbstractItemModel
    • 24.1 Basic Read-Only Single-Column Tree Model
    • 24.2 Adding Multiple Columns to the Tree Model
    • 24.3 Making the Tree Model Editable
    • 24.4 Resizable Tree Model (Inserting and Removing Nodes)
  • 25. Model-View Programming - Delegates
    • 25.1 Using Item Data Roles to Customize Display
    • 25.2 Registering Standard Widgets with QItemEditorFactory
    • 25.3 Registering Custom Widgets with QItemEditorFactory
    • 25.4 Custom Display in QStyledItemDelegate
    • 25.5 Custom Editors in QStyledItemDelegate
    • 25.6 Combining Display and Editing in Delegates
    • 25.7 Persistent Editors in Views
  • 26. Model-View Programming - Sorting, Filtering and Selection
    • 26.1 Implementing In-Place Sorting in Custom Models
    • 26.2 Non-Destructive Sorting in Custom Models
    • 26.3 Automatic Sorting on Data Changes
    • 26.4 Sorting with Proxy Models
    • 26.5 Basic Filtering with Proxy Models
    • 26.6 Custom Filtering in Proxy Models
    • 26.7 Selection Modes and Behaviors
    • 26.8 Responding to Selection Changes
    • 26.9 Sharing Selection Models Between Views
    • 26.10 Custom Selection Handling
  • 27. Multithreading - moveToThread
    • 27.1 Blocking the Qt GUI: How Not to Do It
    • 27.2 A Minimal Working Example
    • 27.3 Walking the Filesystem
    • 27.4 Reusing the QThread object
    • 27.5 Walking the Filesystem reusing the QThread Object
    • 27.6 Signals and Slots Across Threads
  • 28. Using a QThread subclass
    • 28.1 A Minimal Example
    • 28.2 Walking the Filesystem
  • 29. Multithreading with QThreadPool and QRunnable
    • 29.1 A Minimal Example
    • 29.2 Walking the Filesystem
  • 30. Thread Synchronization
    • 30.1 Race Condition Demo
    • 30.2 Queued Signal-Slot Connection
    • 30.3 QMutex
    • 30.4 QMutexLocker
    • 30.5 QSemaphore
    • 30.6 QSemaphoreReleaser
    • 30.7 QWaitCondition
  • 31 More Timers
  • 32. Signals & Slots Connection Types
    • 32.1 Direct Connection
    • 32.2 Queued Connection
    • 32.3 Blocking Queued Connection
  • 33. Databases
    • 33.1 Database Connections
    • 33.2 Executing Simple Queries
    • 33.3 Inserting Data
    • 33.4 Displaying and Editing Data with QSqlTableModel
    • 33.5 Handling Relational Data with QSqlRelationalTableModel
    • 33.6 Custom Queries with QSqlQueryModel
    • 33.7 The Single Record Form
    • 33.8 The Master-Detail Form
  • 34. Processes
    • 34.1 Basic Process Execution
    • 34.2 Providing Fixed Input to a Process
    • 34.3 Handling Chunked Output: A Common Pitfall
    • 34.4 Interactive Process Communication
    • 34.5 Setting Process Environment
    • 34.6 Synchronous Process Execution
    • 34.7 Terminating Processes
  • 35. State Machines
PySide6 Blueprints/31 More Timers

31 More Timers

Up next

32. Signals & Slots Connection Types

In this chapter

  • 31 More Timers