qt-testing
Capture and analyze Qt GUI widgets via screenshots to verify rendering and layout.
Install
mkdir -p .claude/skills/qt-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3139" && unzip -o skill.zip -d .claude/skills/qt-testing && rm skill.zipInstalls to .claude/skills/qt-testing
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Capture and visually inspect Qt GUI widgets using screenshots. Use when asked to verify GUI rendering, test widget appearance, check layouts, or visually inspect any PySide6/Qt component. Enables Claude to "see" Qt interfaces by capturing offscreen screenshots and analyzing them with vision.Key capabilities
- →Capture offscreen screenshots of PySide6/Qt widgets
- →Verify GUI rendering and widget appearance
- →Inspect layout correctness via vision analysis
- →Trigger widget methods directly using coordinates
- →Save screenshots to a dedicated scratch directory
How it works
The tool uses Qt.WA_DontShowOnScreen to render widgets into an offscreen buffer. It saves these as images for vision-based analysis and allows programmatic interaction via widget method calls.
Inputs & outputs
When to use qt-testing
- →Verify widget rendering
- →Check GUI layout correctness
- →Test PySide6 component appearance
About this skill
Qt GUI Testing
Capture screenshots of Qt widgets for visual inspection without displaying windows on screen.
Quick Start
# Capture any widget
from scripts.qt_capture import capture_widget
path = capture_widget(my_widget, "description_here")
# Then read the screenshot with the Read tool
Core Script
Run scripts/qt_capture.py or import capture_widget from it:
# Standalone test
uv run --with PySide6 python .claude/skills/qt-testing/scripts/qt_capture.py
Output Location
All screenshots save to: scratch/.qt-screenshots/
Naming: {YYYY-MM-DD.HH-MM-SS}_{description}.png
Workflow
- Create/obtain the widget to test
- Call
capture_widget(widget, "description") - Read the saved screenshot with the Read tool
- Analyze with vision to verify correctness
Interaction Pattern
To interact with widgets (click buttons, etc.):
# Find widget at coordinates (from vision analysis)
target = widget.childAt(x, y)
# Trigger it directly (not mouse events)
if hasattr(target, 'click'):
target.click()
QApplication.processEvents()
# Capture result
capture_widget(widget, "after_click")
Example: Test a Dialog
import sys
from PySide6.QtWidgets import QApplication
from sleap.gui.learning.dialog import TrainingEditorDialog
# Add skill scripts to path
sys.path.insert(0, ".claude/skills/qt-testing")
from scripts.qt_capture import capture_widget, init_qt
app = init_qt()
dialog = TrainingEditorDialog()
path = capture_widget(dialog, "training_dialog")
dialog.close()
print(f"Inspect: {path}")
Key Points
- Uses
Qt.WA_DontShowOnScreen- no window popup - Renders identically to on-screen display (verified)
- Call
processEvents()after interactions before capture - Use
childAt(x, y)to map vision coordinates to widgets - Direct method calls (
.click()) work; simulated mouse events don't
When not to use it
- →Simulating physical mouse events or clicks
- →Testing non-Qt GUI components
Prerequisites
Limitations
- →Requires direct method calls instead of simulated mouse events
- →Requires manual call to QApplication.processEvents() after interactions
How it compares
Unlike manual testing that requires visible windows, this tool captures widget state programmatically without popping up windows on the screen.
Compared to similar skills
qt-testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| qt-testing (this skill) | 1 | 7mo | Review | Intermediate |
| gui-testing | 0 | 4mo | Review | Intermediate |
| textual | 143 | 9mo | Review | Intermediate |
| streamlit | 86 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by talmolab
View all by talmolab →You might also like
gui-testing
SchurupIK72
>
textual
KyleKing
Expert guidance for building TUI (Text User Interface) applications with the Textual framework. Invoke when user asks about Textual development, TUI apps, widgets, screens, CSS styling, reactive programming, or testing Textual applications.
streamlit
sverzijl
When working with Streamlit web apps, data dashboards, ML/AI app UIs, interactive Python visualizations, or building data science applications with Python
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
backtesting-frameworks
wshobson
Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.
temporal-python-testing
wshobson
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.