PyQtInspect


NamePyQtInspect JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://jeza-chen.com/PyqtInspect
SummaryTo inspect PyQt/PySide program elements like Chrome's element inspector
upload_time2025-08-29 07:25:45
maintainerNone
docs_urlNone
authorJianzhang Chen
requires_python<4,>=3.7
licenseEPL-2.0
keywords pyqt pyside inspect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
<img alt="icon.png" height="60" src="https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/icon.png?raw=true"/>
</div>
<h1 align="center">PyQtInspect</h1>
<p align="center">Inspect PyQt/PySide elements like Chrome DevTools</p>

<p align="center">
<a href="https://github.com/JezaChen/PyQtInspect-Open">Source Code</a> |
<a href="https://jezachen.github.io/PyQtInspect-README-zh">中文文档</a> | 
<a href="https://pypi.org/project/PyQtInspect/">PyPI</a>
</p>

For Python GUI programs developed with PyQt/PySide using Qt Widgets,
it is difficult to view control information, locate the codes where they are defined, 
and perform other operations at runtime. 
It's not as easy as inspecting HTML elements in Chrome/Firefox browsers. 
This project aims to solve this problem by providing an element inspector tool for PyQt/PySide programs, 
similar to Chrome's element inspector.

![hover and inspect](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/overview.gif?raw=true)

## 1. Requirements

- Python 3.7+

- One of the following Qt for Python frameworks installed: PyQt5/PySide2/PyQt6/Pyside6

## 2. Installation

Install with `pip install PyQtInspect`.

## 3. How to start

The `PyQtInspect` architecture has two parts:

- **Debugger/Server**: A GUI app for developers to visually inspect elements, locate code, etc.

- **Debuggee/Client**: Runs inside the target Python process, patches the host’s Python Qt framework, responds to the debugger, and sends host information back.

### 3.1 Overview of startup modes

Two startup modes are supported:

* [**Detached Mode**](#33-detached-mode-traditional-method-one-to-many-debugging): Manually start the GUI server first, then start the debuggee to connect to it. **When the debuggee exits, the GUI server remains running.**

* [**Direct Mode (Recommended)**](#32-direct-mode-convenient-method-recommended-): Start only the debuggee; it will **launch a local GUI server automatically** (no need to start the server yourself). **When the debuggee exits, the GUI server exits with it.**

Note that in **Direct Mode**, each client (debuggee) creates its own server, i.e., one-to-one relationship. Also in **Direct Mode**, you cannot manually specify the listening port, close connections, or attach to processes.

**Detached Mode** supports remote debugging (server and client on different machines). **Direct Mode** does not, since the client and its auto-launched server run on the same machine.

PyQtInspect also supports [running in IDEs like PyCharm](#341-run-pyqtinspect-in-pycharm-and-other-ides-supports-detached-mode-direct-mode) and [attaching to an existing PyQt/PySide process](#342-attach-to-process-detached-mode-only-currently-unstable).

### 3.2 Direct Mode (Convenient method, recommended 👍)

This **recommended** one-step method launches both the PyQtInspect server and client together. It requires full access to the Python source code of the debugged program.

If you normally run your **PyQt5** app via `python xxx.py param1 param2`, simply insert `-m PyQtInspect --direct --file` between `python` and `xxx.py`, i.e.:
`python -m PyQtInspect --direct --file xxx.py param1 param2` to start debugging with PyQtInspect.

If the app uses **PySide2/PyQt6/PySide6**, you **must also add the `--qt-support` option** to specify the Qt framework. For example, for PySide2 you should use:
`python -m PyQtInspect --direct --qt-support=pyside2 --file xxx.py param1 param2`.

For Direct Mode, the full command is:

```powershell
python -m PyQtInspect --direct [--multiprocess] [--show-pqi-stack] [--qt-support=[pyqt5|pyside2|pyqt6|pyside6]] --file py_file [file_args]
```

Parameter meanings:

* `--direct`: Use **Direct Mode**
* `--multiprocess`: Enable **multi-process debugging** (off by default)
* `--show-pqi-stack`: Show call stacks related to PyQtInspect (hidden by default)
* `--qt-support`: Qt framework used by the target app, default `pyqt5`; choose from `pyqt5`, `pyside2`, `pyqt6`, `pyside6`
* `--file`: Path to the target app’s Python entry file
* `file_args`: Command-line arguments for the debuggee

For example, to debug the PySide2 version of [`PyQt-Fluent-Widgets`][1], whose demo runs via
`python examples/gallery/demo.py`, you can use:
`python -m PyQtInspect --direct --qt-support=pyside2 --file examples/gallery/demo.py` to launch PyQtInspect in Direct Mode.

> Note: When using PyCharm or other IDEs that rely on the pydevd debugger, **ensure the IDE’s [‘PyQt compatible’ option][4] matches the Qt framework used by your project**, otherwise PyQtInspect may not work correctly or could crash the program.

### 3.3 Detached Mode (Traditional method, one-to-many debugging)

In Detached Mode, **make sure to start the GUI server before launching the debugged Python program**.

#### 3.3.1 Start the Debugger (Server)

Run `pqi-server` in a terminal to launch the server GUI. After launch, set the listening port (default `19394`) and click **Serve** to start the server.

<img alt="start_server.png" height="600" src="https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/start_server.png?raw=true"/>

#### 3.3.2 Start the Debuggee (Client): Attach PyQtInspect when running program source code

Prerequisite: You must have the target program’s Python source.

Similar to Direct Mode, if you run a **PyQt5** app via `python xxx.py param1 param2`, insert `-m PyQtInspect --file` between `python` and `xxx.py`, i.e.:
`python -m PyQtInspect --file xxx.py param1 param2` to start debugging with PyQtInspect.

Likewise, for **PySide2/PyQt6/Pyside6**, **also add `--qt-support`** to specify the framework. For example, for PySide2:
`python -m PyQtInspect --qt-support=pyside2 --file xxx.py param1 param2`.

For Detached Mode, the full command is:

```powershell
python -m PyQtInspect [--port N] [--client hostname] [--multiprocess] [--show-pqi-stack] [--qt-support=[pyqt5|pyside2|pyqt6|pyside6]] --file py_file [file_args]
```

Parameter meanings:

* `--port`: Server listening port (default `19394`)
* `--client`: Server address (default `127.0.0.1`)
* `--multiprocess`: Enable **multi-process debugging** (off by default)
* `--show-pqi-stack`: Show call stacks related to PyQtInspect (hidden by default)
* `--qt-support`: Qt framework used by the target app, default `pyqt5`; choose from `pyqt5`, `pyside2`, `pyqt6`, `pyside6`
* `--file`: Path to the target app’s Python entry file
* `file_args`: Command-line arguments for the target app

Again using the PySide2 version of [`PyQt-Fluent-Widgets`][1] as an example: if the GUI debugger is already running locally (address `127.0.0.1`) on the default port `19394`, you can start the client with
`python -m PyQtInspect --qt-support=pyside2 --file examples/gallery/demo.py`.
(Here the server address and port are defaults, so you don’t need to pass `--client` or `--port`.)

> Note: When using PyCharm or other IDEs that rely on the pydevd debugger, make sure the IDE’s [‘PyQt compatible’ option][4] matches your project’s framework, otherwise PyQtInspect may not work correctly or could crash the program.

### 3.4 Other run methods

#### 3.4.1 Run PyQtInspect in PyCharm and other IDEs (supports Detached Mode/Direct Mode)

Debug the PyQtInspect module directly in PyCharm; this won’t interfere with debugging your app.

Also taking [`PyQt-Fluent-Widgets`][1] as an example, you can create a new Debug configuration like so:

<img alt="pycharm config" src="https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/pycharm_config_en.png?raw=true"/>

Then simply Run/Debug.

#### 3.4.2 Attach to Process (Detached Mode only, currently unstable)

If you **don’t have the target app’s source**, you can **try** enabling inspect via process attach.

Click **More → Attach To Process** to open the attach window, choose the target process, then click **Attach**.

**Note:** For most controls, you **cannot retrieve their creation call stacks** unless they were created **after** you attached.

![attach process](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/attach_process.gif?raw=true)

## 4. Usage

### 4.1 Select elements

Click **Select** to start picking. Hover over a control to highlight it and preview brief info (class name, object name, size, relative position, styles, etc.).

Left-click to select the control. You can then inspect it in depth: view and jump to its initialization call stack, execute code in its context, view hierarchy info, view the control tree, and inspect properties.

![hover and inspect](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/select_and_click.gif?raw=true)

### 4.2 View control properties

The second tab below the brief info shows detailed properties, organized hierarchically by class inheritance and property type.

<img alt="detailed_props" src="https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/detailed_props.png?raw=true" width="350"/>

### 4.3 View the control’s initialization call stack

The first tab below the brief info shows the call stack at control creation. Double-click to open PyCharm and navigate to the file and line.

![create stacks](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/create_stack.gif?raw=true)

If opening PyCharm fails, set the PyCharm path under **More → Settings**.

**P.S. For clients started via [Attach to Process](#342-attach-to-process-detached-mode-only-currently-unstable), if the control already existed when you attached, creation info won’t be available and the call stack will be empty.**

### 4.4 Execute code

After selecting a control, click **Run Code** to execute code in the scope of the selected control (`self` is the control instance; essentially this runs inside a method of the control object).

![run code](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/run_code.gif?raw=true)

### 4.5 View hierarchy information

At the bottom is the hierarchy breadcrumb. You can view, highlight, and locate ancestor and child controls of the selection, making it easy to navigate the hierarchy.
Combined with mouse selecting, this enables more precise selection.

![inspect hierarchy](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/inspect_hierarchy.gif?raw=true)

### 4.6 While selecting, use right-click to simulate left-click

*(Enabled by default. To disable, go to **More → Mock Right Button Down as Left When Selecting Elements** and uncheck.)*

Some controls only appear after a left-click. For easier picking, you can simulate left-click with the right mouse button.

**P.S. This only applies while mouse selecting is active.**

![mock right button as left](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/mock_right_btn_as_left.gif?raw=true)

### 4.7 Force-select with F8

*(Enabled by default. To disable, go to **More → Press F8 to Finish Selecting** and uncheck.)*

For controls that are hard to pick with the mouse, press **F8** to finish selection. Note that F8 only ends an ongoing selection; when selection isn’t active, pressing F8 will not start it.

### 4.8 View the control tree

Click **View → Control Tree** to see the control tree of the process that contains the selected control.
Click (or hover) a row in the tree to highlight the corresponding control.

![control tree](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/control_tree.gif?raw=true)

## 5. Known Issues
- **Patching fails with multiple inheritance involving more than two PyQt classes**, such as class `A(B, C)`, 
    where `B` and `C` inherit from **QObject**. This might cause the `__init__` method of `C` to not execute, leading to exceptions.
    > [The author of PyQt has warned against multiple inheritance with more than two PyQt classes][2], as it can also cause abnormal behavior in PyQt itself.

- Cannot select some controls for **PyQt6**.

- For some computers, sometimes the `QEnterEvent` will have the type `170` (which is `QEvent.DynamicPropertyChange`),
    which may cause crash when accessing the `propertyName` method.

## 6. Changelog

### 0.4.0

* Added the “Properties” tab
* Added toolbar entries to open/clear logs
* Fixed a series of issues

[1]: https://github.com/zhiyiYo/PyQt-Fluent-Widgets
[2]: https://www.riverbankcomputing.com/pipermail/pyqt/2017-January/038650.html
[3]: https://pypi.org/project/PyQtInspect/#files
[4]: https://www.jetbrains.com/help/pycharm/debugger-python.html
[5]: https://github.com/JezaChen/ihook

            

Raw data

            {
    "_id": null,
    "home_page": "https://jeza-chen.com/PyqtInspect",
    "name": "PyQtInspect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": null,
    "keywords": "pyqt pyside inspect",
    "author": "Jianzhang Chen",
    "author_email": "jezachen@163.com",
    "download_url": "https://files.pythonhosted.org/packages/e7/74/cf78d203500a060e3e1044982d72a27f0f47f9693c22e7018d06f1dcda59/pyqtinspect-0.4.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n<img alt=\"icon.png\" height=\"60\" src=\"https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/icon.png?raw=true\"/>\r\n</div>\r\n<h1 align=\"center\">PyQtInspect</h1>\r\n<p align=\"center\">Inspect PyQt/PySide elements like Chrome DevTools</p>\r\n\r\n<p align=\"center\">\r\n<a href=\"https://github.com/JezaChen/PyQtInspect-Open\">Source Code</a> |\r\n<a href=\"https://jezachen.github.io/PyQtInspect-README-zh\">\u4e2d\u6587\u6587\u6863</a> | \r\n<a href=\"https://pypi.org/project/PyQtInspect/\">PyPI</a>\r\n</p>\r\n\r\nFor Python GUI programs developed with PyQt/PySide using Qt Widgets,\r\nit is difficult to view control information, locate the codes where they are defined, \r\nand perform other operations at runtime. \r\nIt's not as easy as inspecting HTML elements in Chrome/Firefox browsers. \r\nThis project aims to solve this problem by providing an element inspector tool for PyQt/PySide programs, \r\nsimilar to Chrome's element inspector.\r\n\r\n![hover and inspect](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/overview.gif?raw=true)\r\n\r\n## 1. Requirements\r\n\r\n- Python 3.7+\r\n\r\n- One of the following Qt for Python frameworks installed: PyQt5/PySide2/PyQt6/Pyside6\r\n\r\n## 2. Installation\r\n\r\nInstall with `pip install PyQtInspect`.\r\n\r\n## 3. How to start\r\n\r\nThe `PyQtInspect` architecture has two parts:\r\n\r\n- **Debugger/Server**: A GUI app for developers to visually inspect elements, locate code, etc.\r\n\r\n- **Debuggee/Client**: Runs inside the target Python process, patches the host\u2019s Python Qt framework, responds to the debugger, and sends host information back.\r\n\r\n### 3.1 Overview of startup modes\r\n\r\nTwo startup modes are supported:\r\n\r\n* [**Detached Mode**](#33-detached-mode-traditional-method-one-to-many-debugging): Manually start the GUI server first, then start the debuggee to connect to it. **When the debuggee exits, the GUI server remains running.**\r\n\r\n* [**Direct Mode (Recommended)**](#32-direct-mode-convenient-method-recommended-): Start only the debuggee; it will **launch a local GUI server automatically** (no need to start the server yourself). **When the debuggee exits, the GUI server exits with it.**\r\n\r\nNote that in **Direct Mode**, each client (debuggee) creates its own server, i.e., one-to-one relationship. Also in **Direct Mode**, you cannot manually specify the listening port, close connections, or attach to processes.\r\n\r\n**Detached Mode** supports remote debugging (server and client on different machines). **Direct Mode** does not, since the client and its auto-launched server run on the same machine.\r\n\r\nPyQtInspect also supports [running in IDEs like PyCharm](#341-run-pyqtinspect-in-pycharm-and-other-ides-supports-detached-mode-direct-mode) and [attaching to an existing PyQt/PySide process](#342-attach-to-process-detached-mode-only-currently-unstable).\r\n\r\n### 3.2 Direct Mode (Convenient method, recommended \ud83d\udc4d)\r\n\r\nThis **recommended** one-step method launches both the PyQtInspect server and client together. It requires full access to the Python source code of the debugged program.\r\n\r\nIf you normally run your **PyQt5** app via `python xxx.py param1 param2`, simply insert `-m PyQtInspect --direct --file` between `python` and `xxx.py`, i.e.:\r\n`python -m PyQtInspect --direct --file xxx.py param1 param2` to start debugging with PyQtInspect.\r\n\r\nIf the app uses **PySide2/PyQt6/PySide6**, you **must also add the `--qt-support` option** to specify the Qt framework. For example, for PySide2 you should use:\r\n`python -m PyQtInspect --direct --qt-support=pyside2 --file xxx.py param1 param2`.\r\n\r\nFor Direct Mode, the full command is:\r\n\r\n```powershell\r\npython -m PyQtInspect --direct [--multiprocess] [--show-pqi-stack] [--qt-support=[pyqt5|pyside2|pyqt6|pyside6]] --file py_file [file_args]\r\n```\r\n\r\nParameter meanings:\r\n\r\n* `--direct`: Use **Direct Mode**\r\n* `--multiprocess`: Enable **multi-process debugging** (off by default)\r\n* `--show-pqi-stack`: Show call stacks related to PyQtInspect (hidden by default)\r\n* `--qt-support`: Qt framework used by the target app, default `pyqt5`; choose from `pyqt5`, `pyside2`, `pyqt6`, `pyside6`\r\n* `--file`: Path to the target app\u2019s Python entry file\r\n* `file_args`: Command-line arguments for the debuggee\r\n\r\nFor example, to debug the PySide2 version of [`PyQt-Fluent-Widgets`][1], whose demo runs via\r\n`python examples/gallery/demo.py`, you can use:\r\n`python -m PyQtInspect --direct --qt-support=pyside2 --file examples/gallery/demo.py` to launch PyQtInspect in Direct Mode.\r\n\r\n> Note: When using PyCharm or other IDEs that rely on the pydevd debugger, **ensure the IDE\u2019s [\u2018PyQt compatible\u2019 option][4] matches the Qt framework used by your project**, otherwise PyQtInspect may not work correctly or could crash the program.\r\n\r\n### 3.3 Detached Mode (Traditional method, one-to-many debugging)\r\n\r\nIn Detached Mode, **make sure to start the GUI server before launching the debugged Python program**.\r\n\r\n#### 3.3.1 Start the Debugger (Server)\r\n\r\nRun `pqi-server` in a terminal to launch the server GUI. After launch, set the listening port (default `19394`) and click **Serve** to start the server.\r\n\r\n<img alt=\"start_server.png\" height=\"600\" src=\"https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/start_server.png?raw=true\"/>\r\n\r\n#### 3.3.2 Start the Debuggee (Client): Attach PyQtInspect when running program source code\r\n\r\nPrerequisite: You must have the target program\u2019s Python source.\r\n\r\nSimilar to Direct Mode, if you run a **PyQt5** app via `python xxx.py param1 param2`, insert `-m PyQtInspect --file` between `python` and `xxx.py`, i.e.:\r\n`python -m PyQtInspect --file xxx.py param1 param2` to start debugging with PyQtInspect.\r\n\r\nLikewise, for **PySide2/PyQt6/Pyside6**, **also add `--qt-support`** to specify the framework. For example, for PySide2:\r\n`python -m PyQtInspect --qt-support=pyside2 --file xxx.py param1 param2`.\r\n\r\nFor Detached Mode, the full command is:\r\n\r\n```powershell\r\npython -m PyQtInspect [--port N] [--client hostname] [--multiprocess] [--show-pqi-stack] [--qt-support=[pyqt5|pyside2|pyqt6|pyside6]] --file py_file [file_args]\r\n```\r\n\r\nParameter meanings:\r\n\r\n* `--port`: Server listening port (default `19394`)\r\n* `--client`: Server address (default `127.0.0.1`)\r\n* `--multiprocess`: Enable **multi-process debugging** (off by default)\r\n* `--show-pqi-stack`: Show call stacks related to PyQtInspect (hidden by default)\r\n* `--qt-support`: Qt framework used by the target app, default `pyqt5`; choose from `pyqt5`, `pyside2`, `pyqt6`, `pyside6`\r\n* `--file`: Path to the target app\u2019s Python entry file\r\n* `file_args`: Command-line arguments for the target app\r\n\r\nAgain using the PySide2 version of [`PyQt-Fluent-Widgets`][1] as an example: if the GUI debugger is already running locally (address `127.0.0.1`) on the default port `19394`, you can start the client with\r\n`python -m PyQtInspect --qt-support=pyside2 --file examples/gallery/demo.py`.\r\n(Here the server address and port are defaults, so you don\u2019t need to pass `--client` or `--port`.)\r\n\r\n> Note: When using PyCharm or other IDEs that rely on the pydevd debugger, make sure the IDE\u2019s [\u2018PyQt compatible\u2019 option][4] matches your project\u2019s framework, otherwise PyQtInspect may not work correctly or could crash the program.\r\n\r\n### 3.4 Other run methods\r\n\r\n#### 3.4.1 Run PyQtInspect in PyCharm and other IDEs (supports Detached Mode/Direct Mode)\r\n\r\nDebug the PyQtInspect module directly in PyCharm; this won\u2019t interfere with debugging your app.\r\n\r\nAlso taking [`PyQt-Fluent-Widgets`][1] as an example, you can create a new Debug configuration like so:\r\n\r\n<img alt=\"pycharm config\" src=\"https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/pycharm_config_en.png?raw=true\"/>\r\n\r\nThen simply Run/Debug.\r\n\r\n#### 3.4.2 Attach to Process (Detached Mode only, currently unstable)\r\n\r\nIf you **don\u2019t have the target app\u2019s source**, you can **try** enabling inspect via process attach.\r\n\r\nClick **More \u2192 Attach To Process** to open the attach window, choose the target process, then click **Attach**.\r\n\r\n**Note:** For most controls, you **cannot retrieve their creation call stacks** unless they were created **after** you attached.\r\n\r\n![attach process](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/attach_process.gif?raw=true)\r\n\r\n## 4. Usage\r\n\r\n### 4.1 Select elements\r\n\r\nClick **Select** to start picking. Hover over a control to highlight it and preview brief info (class name, object name, size, relative position, styles, etc.).\r\n\r\nLeft-click to select the control. You can then inspect it in depth: view and jump to its initialization call stack, execute code in its context, view hierarchy info, view the control tree, and inspect properties.\r\n\r\n![hover and inspect](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/select_and_click.gif?raw=true)\r\n\r\n### 4.2 View control properties\r\n\r\nThe second tab below the brief info shows detailed properties, organized hierarchically by class inheritance and property type.\r\n\r\n<img alt=\"detailed_props\" src=\"https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/detailed_props.png?raw=true\" width=\"350\"/>\r\n\r\n### 4.3 View the control\u2019s initialization call stack\r\n\r\nThe first tab below the brief info shows the call stack at control creation. Double-click to open PyCharm and navigate to the file and line.\r\n\r\n![create stacks](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/create_stack.gif?raw=true)\r\n\r\nIf opening PyCharm fails, set the PyCharm path under **More \u2192 Settings**.\r\n\r\n**P.S. For clients started via [Attach to Process](#342-attach-to-process-detached-mode-only-currently-unstable), if the control already existed when you attached, creation info won\u2019t be available and the call stack will be empty.**\r\n\r\n### 4.4 Execute code\r\n\r\nAfter selecting a control, click **Run Code** to execute code in the scope of the selected control (`self` is the control instance; essentially this runs inside a method of the control object).\r\n\r\n![run code](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/run_code.gif?raw=true)\r\n\r\n### 4.5 View hierarchy information\r\n\r\nAt the bottom is the hierarchy breadcrumb. You can view, highlight, and locate ancestor and child controls of the selection, making it easy to navigate the hierarchy.\r\nCombined with mouse selecting, this enables more precise selection.\r\n\r\n![inspect hierarchy](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/inspect_hierarchy.gif?raw=true)\r\n\r\n### 4.6 While selecting, use right-click to simulate left-click\r\n\r\n*(Enabled by default. To disable, go to **More \u2192 Mock Right Button Down as Left When Selecting Elements** and uncheck.)*\r\n\r\nSome controls only appear after a left-click. For easier picking, you can simulate left-click with the right mouse button.\r\n\r\n**P.S. This only applies while mouse selecting is active.**\r\n\r\n![mock right button as left](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/mock_right_btn_as_left.gif?raw=true)\r\n\r\n### 4.7 Force-select with F8\r\n\r\n*(Enabled by default. To disable, go to **More \u2192 Press F8 to Finish Selecting** and uncheck.)*\r\n\r\nFor controls that are hard to pick with the mouse, press **F8** to finish selection. Note that F8 only ends an ongoing selection; when selection isn\u2019t active, pressing F8 will not start it.\r\n\r\n### 4.8 View the control tree\r\n\r\nClick **View \u2192 Control Tree** to see the control tree of the process that contains the selected control.\r\nClick (or hover) a row in the tree to highlight the corresponding control.\r\n\r\n![control tree](https://github.com/JezaChen/PyQtInspect-README-Assets/blob/main/Images/0.4.0/control_tree.gif?raw=true)\r\n\r\n## 5. Known Issues\r\n- **Patching fails with multiple inheritance involving more than two PyQt classes**, such as class `A(B, C)`, \r\n    where `B` and `C` inherit from **QObject**. This might cause the `__init__` method of `C` to not execute, leading to exceptions.\r\n    > [The author of PyQt has warned against multiple inheritance with more than two PyQt classes][2], as it can also cause abnormal behavior in PyQt itself.\r\n\r\n- Cannot select some controls for **PyQt6**.\r\n\r\n- For some computers, sometimes the `QEnterEvent` will have the type `170` (which is `QEvent.DynamicPropertyChange`),\r\n    which may cause crash when accessing the `propertyName` method.\r\n\r\n## 6. Changelog\r\n\r\n### 0.4.0\r\n\r\n* Added the \u201cProperties\u201d tab\r\n* Added toolbar entries to open/clear logs\r\n* Fixed a series of issues\r\n\r\n[1]: https://github.com/zhiyiYo/PyQt-Fluent-Widgets\r\n[2]: https://www.riverbankcomputing.com/pipermail/pyqt/2017-January/038650.html\r\n[3]: https://pypi.org/project/PyQtInspect/#files\r\n[4]: https://www.jetbrains.com/help/pycharm/debugger-python.html\r\n[5]: https://github.com/JezaChen/ihook\r\n",
    "bugtrack_url": null,
    "license": "EPL-2.0",
    "summary": "To inspect PyQt/PySide program elements like Chrome's element inspector",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://jeza-chen.com/PyqtInspect"
    },
    "split_keywords": [
        "pyqt",
        "pyside",
        "inspect"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "765575108a2005dde3d2966aee2f699a63531236664a1d0eba01522d84124dab",
                "md5": "6803f5d79688758ca8bcec74b2c4b96c",
                "sha256": "c1e3c556b19572e873d60fbfbd8cb584d736ac819c4b087eec6c87d30699a027"
            },
            "downloads": -1,
            "filename": "pyqtinspect-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6803f5d79688758ca8bcec74b2c4b96c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 4674556,
            "upload_time": "2025-08-29T07:25:38",
            "upload_time_iso_8601": "2025-08-29T07:25:38.427268Z",
            "url": "https://files.pythonhosted.org/packages/76/55/75108a2005dde3d2966aee2f699a63531236664a1d0eba01522d84124dab/pyqtinspect-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e774cf78d203500a060e3e1044982d72a27f0f47f9693c22e7018d06f1dcda59",
                "md5": "ffc1aed5be8ac14891b7cc1735a0f114",
                "sha256": "0770b102ef9aa842af6c9cc56d9a4a6e3fc283f83fcd748915f11faece156496"
            },
            "downloads": -1,
            "filename": "pyqtinspect-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ffc1aed5be8ac14891b7cc1735a0f114",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 4551108,
            "upload_time": "2025-08-29T07:25:45",
            "upload_time_iso_8601": "2025-08-29T07:25:45.481228Z",
            "url": "https://files.pythonhosted.org/packages/e7/74/cf78d203500a060e3e1044982d72a27f0f47f9693c22e7018d06f1dcda59/pyqtinspect-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 07:25:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyqtinspect"
}
        
Elapsed time: 9.93739s