Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

qt-debuggingqt 调试

Agent Skill

qt-debugging 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

685

周安装

28

GitHub Stars

5

下载量

222
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qt-debugging(qt 调试)
来源仓库:https://github.com/l3digital-net/claude-code-plugins
仓库路径:skills/qt-debugging
安装命令:
npx skills add https://github.com/l3digital-net/claude-code-plugins --skill qt-debugging
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/l3digital-net/claude-code-plugins --skill qt-debugging

简介

qt-debugging 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态进行整理。

  • 可协助跟踪代码变更、分析协作事项或生成项目报告,提升开发流程效率。
  • 通过 npx skills add 命令从 GitHub 安装,需确认是否具备读取仓库元数据或 API 调用的权限。
  • 建议结合原始 README 了解具体输入格式与输出结构,避免误用导致信息偏差。
  • 使用前请评估是否会触发网络请求或写入操作,确保符合团队协作规范。

SKILL.md

Qt Debugging

Diagnostic Approach

  1. Read the full Qt warning output — Qt prints actionable warnings before crashes
  2. Categorize the failure type (see categories below)
  3. Isolate — reproduce with a minimal test case
  4. Fix and verify with QT_QPA_PLATFORM=offscreen pytest

Enabling Verbose Qt Output

# Show all Qt debug/warning messages
QT_LOGGING_RULES="*.debug=true" python -m myapp

# Filter to specific categories
QT_LOGGING_RULES="qt.qpa.*=true;qt.widgets.*=true" python -m myapp

# C++
qputenv("QT_LOGGING_RULES", "*.debug=true");
# Python: install message handler to capture Qt output
from PySide6.QtCore import qInstallMessageHandler, QtMsgType

def qt_message_handler(mode: QtMsgType, context, message: str) -> None:
    if mode == QtMsgType.QtCriticalMsg or mode == QtMsgType.QtFatalMsg:
        import traceback
        traceback.print_stack()
    print(f"Qt [{mode.name}]: {message}")

qInstallMessageHandler(qt_message_handler)

Common Failure Categories

Widget Never Appears

  • show() not called on top-level widget
  • Parent widget not shown (child inherits visibility)
  • setFixedSize(0, 0) or zero content margins collapsing it
  • Widget created after app.exec() returns (after event loop exits)
  • setVisible(False) still in effect
# Diagnostic
print(widget.isVisible(), widget.size(), widget.parentWidget())

Crash / Segfault on Widget Access

  • Widget garbage-collected (Python deleted the QWidget before Qt finished with it)
  • Common cause: widget stored only in a local variable, not self._widget
  • Fix: always assign widgets to self attributes in __init__
# BAD — local variable, GC can collect it
def setup(self):
    btn = QPushButton("Click")   # may be deleted immediately

# GOOD
def setup(self):
    self._btn = QPushButton("Click")

"QObject: Cannot create children for a parent in a different thread"

  • A QObject with a parent is being created in a non-main thread
  • Fix: create the object parentless, then use moveToThread or deleteLater for cleanup

"QPixmap: Must construct a QGuiApplication before a QPaintDevice"

  • QPixmap, QImage, or QIcon created before QApplication exists
  • Fix: move all Qt object construction after app = QApplication(sys.argv)

"RuntimeError: Internal C++ object (QWidget) already deleted"

  • Accessing a Python wrapper after Qt deleted the underlying C++ object
  • Common with deleteLater() — the deletion happens asynchronously
  • Fix: check sip.isdeleted(widget) (PyQt6) or use QPointer pattern

Event Loop Frozen / UI Unresponsive

  • Blocking call on main thread (I/O, time.sleep, heavy computation)
  • Fix: move to QRunnable/QThread (see qt-threading skill)
# Quick diagnostic: add to slow code path
from PySide6.QtCore import QCoreApplication
QCoreApplication.processEvents()  # temporarily unblocks — confirms event loop is stuck

Signal Connected But Never Fires

  1. Verify the sender object is still alive
  2. Add debug connection: signal.connect(lambda *a: print("FIRED", a))
  3. Check signal type signature matches — Signal(int) will not fire if you emit Signal(str) equivalent
  4. For C++: verify Q_OBJECT is present and moc ran after last change

Memory / Resource Leak Detection

# Track live QObject count
from PySide6.QtCore import QObject
# No built-in — use objgraph
import objgraph
objgraph.show_most_common_types(limit=20)
objgraph.show_growth()

Useful Diagnostic Patterns

# Dump full widget tree
def dump_widget_tree(widget, indent=0):
    print("  " * indent + repr(widget))
    for child in widget.children():
        if isinstance(child, QWidget):
            dump_widget_tree(child, indent + 1)

# Check if event loop is running
from PySide6.QtCore import QEventLoop
print(QCoreApplication.instance().loopLevel())  # > 0 if exec() is running

# Force sync paint (debugging paint issues)
widget.repaint()  # synchronous vs update() which defers

QSS / Style Debugging

# Print effective stylesheet for a widget
print(widget.styleSheet())

# Check if style rules are applying
# Add a unique background to isolate
widget.setStyleSheet("background: lime;")   # visible indicator

# Force re-evaluation after property change
widget.style().unpolish(widget)
widget.style().polish(widget)
widget.update()

C++ Specific

// Enable ASAN for memory errors
// cmake -DCMAKE_CXX_FLAGS="-fsanitize=address" ...

// Qt debug output
qDebug() << "Widget size:" << widget->size();
qWarning() << "Unexpected state:" << state;

// Print all object properties
qDebug() << widget->metaObject()->className();

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.17%
按下载量换算80

Claude

28.85%
按下载量换算64

Cursor

17.51%
按下载量换算39

Gemini CLI

7.76%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills