diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fdc6700..2cfa349c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - add `ida-plugin.json` for inclusion in the IDA Pro plugin repository @williballenthin - ida plugin: add Qt compatibility layer for PyQt5 and PySide6 support @williballenthin #2707 +- delay import to not load Qt* when running under idalib @mr-tz #2752 ### Development diff --git a/capa/ida/plugin/__init__.py b/capa/ida/plugin/__init__.py index d511d891..f2703ef7 100644 --- a/capa/ida/plugin/__init__.py +++ b/capa/ida/plugin/__init__.py @@ -17,7 +17,6 @@ import logging import idaapi import ida_kernwin -from capa.ida.plugin.form import CapaExplorerForm from capa.ida.plugin.icon import ICON logger = logging.getLogger(__name__) @@ -74,6 +73,9 @@ class CapaExplorerPlugin(idaapi.plugin_t): arg (int): bitflag. Setting LSB enables automatic analysis upon loading. The other bits are currently undefined. See `form.Options`. """ + # delay import to not trigger load of Qt components when not running in idaq, i.e., in idalib + from capa.ida.plugin.form import CapaExplorerForm + if not self.form: self.form = CapaExplorerForm(self.PLUGIN_NAME, arg) else: