pyqt-testing

Test PyQt/PySide GUI applications with pytest-qt qtbot user interactions.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Leonard-Data/report-convertor --skill pyqt-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyqt-testing
Source: https://github.com/Leonard-Data/report-convertor/tree/main/.agents/skills/pyqt-testing
Command: npx skills add https://github.com/Leonard-Data/report-convertor --skill pyqt-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Efficiently test PyQt/PySide GUI applications by simulating user interactions and validating widget behavior, signals, and dialogs without manual testing.

Core Features & Use Cases

  • qtbot fixture for widget interaction and cleanup
  • waitSignal, mouse and keyboard simulations, dialog testing, and cross-widget flows
  • Use cases include verifying button clicks, input handling, dialog results, and threaded UI updates

Quick Start

Create tests that instantiate Qt widgets, register them with qtbot, and simulate user interactions to verify UI behavior.

Frequently Asked Questions about pyqt-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test PyQt GUI applications by simulating user interactions?

To test PyQt GUI applications, you can use pytest-qt and the qtbot fixture to instantiate widgets, simulate mouse and keyboard interactions, and verify UI behavior without manual testing.

What is the best way to verify widget behavior and signal handling in PySide desktop applications?

The best way to verify widget behavior and signal handling in PySide applications is using pytest-qt to register widgets with qtbot and assert signal emissions and widget states.

How does waitSignal work when testing threaded UI updates in PyQt?

The waitSignal mechanism in PyQt testing works by pausing test execution until a specific signal is emitted, ensuring threaded UI updates are fully processed before assertions are made.

Can I use pytest-qt to test dialog flows and input handling in desktop applications?

Yes, you can use pytest-qt to test dialog flows and input handling by instantiating dialogs with qtbot and simulating keyboard entries to validate dialog results and cross-widget behavior.

Does the qtbot fixture support automated widget cleanup after GUI testing?

Yes, the qtbot fixture supports automated widget cleanup, ensuring that all instantiated Qt widgets are properly destroyed after each test to prevent side effects and memory leaks.