Environment:3641397194 wq Gpt6 Astra IDA Pro PyQt5
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Reverse_Engineering |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
IDA Pro 9.x with its bundled PyQt5 / Python 3.12 (sip) runtime, providing the Qt5 widget and IDA SDK plugin APIs used by the runtime UI localization plugin.
Description
IDA Pro 9.x ships with an embedded CPython 3.12 interpreter and a bundled PyQt5 build (built against the same Qt5 DLLs IDA uses for its own UI). Plugins loaded via `ida_idaapi.plugin_t` run inside this interpreter and may import `ida_*` SDK modules (`ida_idaapi`, `ida_kernwin`, `ida_funcs`) as well as PyQt5 classes (`QProxyStyle`, `QStyleOption`, `QWidget`). The runtime plugin relies on the paint-layer hook (`QProxyStyle.drawControl`) and reversible text replacement on live widgets, so it requires the exact Qt5 stack IDA bundles — a system PyQt5 install is not compatible. No separate Python or PyQt installation is needed; everything comes with the IDA Pro install.
Usage
Use this environment for the IDA Pro runtime localization plugin (`ida_zh_cn.py`) and its companion dictionary. The plugin is loaded by IDA on startup (or via the Plugins menu) and operates entirely within the IDA/PyQt5 process. Install by copying the plugin + dictionary into the IDA `plugins/` directory (the desktop app's `ida-toolbox.js` automates this).
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| IDA Pro | 9.x | Plugin targets the 9.x Qt5 UI; earlier versions use a different widget set |
| Python | 3.12 (bundled with IDA) | IDA embeds CPython 3.12; sip-based bindings |
| PyQt5 | Bundled with IDA 9.x | System PyQt5 is NOT compatible — must use IDA's bundled build |
| OS | Windows / Linux | IDA Pro 9.x supports both; macOS uses the same Qt5 stack |
Dependencies
System Packages
- IDA Pro 9.x (includes embedded Python 3.12 and PyQt5)
Python Packages
- `PyQt5` (bundled with IDA — provides `QProxyStyle`, `QStyleOption`, `QWidget`)
- `ida_*` SDK modules (bundled with IDA — `ida_idaapi`, `ida_kernwin`, `ida_funcs`)
Credentials
This environment does not require external credentials. IDA Pro licensing is handled by the IDA installer/activator, not by the plugin runtime.
Quick Install
# No separate Python/PyQt5 install — they ship with IDA Pro 9.x.
# Verify the bundled interpreter in the IDAPython console:
import sys; print(sys.version) # -> 3.12.x
from PyQt5 import QtWidgets; print("ok")
# Copy the plugin + dictionary into the IDA plugins directory
# (the desktop app automates this via ida-toolbox.js)
Code Evidence
Plugin entry point from `ida_zh_cn.py`:
import ida_idaapi
class ZhCnPlugin(ida_idaapi.plugin_t):
flags = ida_idaapi.PLUGIN_FIX
wanted_name = "中文界面 开/关"
def init(self) -> int: ...
def run(self, arg: int) -> None: ...
def term(self) -> None: ...
def PLUGIN_ENTRY() -> ZhCnPlugin:
return ZhCnPlugin()
Paint-layer hook using IDA's bundled PyQt5:
from PyQt5.QtWidgets import QProxyStyle, QStyleOption
class ZhProxyStyle(QProxyStyle):
def drawControl(self, element, option, painter, widget=None):
opt = QStyleOption(option)
opt.text = translate(opt.text) or opt.text
super().drawControl(element, opt, painter, widget)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `No module named 'PyQt5'` | System Python used instead of IDA's bundled interpreter | Run the plugin inside IDA (IDAPython), not an external Python |
| `find_widget("Output window")` fails after localization | Paint-layer hook replaced the identity string | The plugin translates only the paint copy, not the widget identity — ensure `QProxyStyle` is used (not direct text replacement on menu bars) |
| Plugin does not load | `plugins/` path mismatch | Confirm `ida_zh_cn.py` + `zh_cn.json` are in the IDA user plugins directory |
Compatibility Notes
- IDA Pro 9.x only: The Qt5 widget tree and `QProxyStyle` hook target the 9.x UI; earlier IDA versions differ.
- Bundled PyQt5: A system-installed PyQt5 links against a different Qt5 and will not match IDA's widgets — always use IDA's bundled build.
- Python 3.12 (sip): IDA 9.x embeds CPython 3.12 with sip-based bindings; the plugin is written for this interpreter.
- Reversible: Uninstall restores all English text (originals stored as Qt properties); no IDA files are modified.