TWidgetToPySideWidget() fails with "module '__main__' has no attribute 'QtGui'"

The following code is not working in IDA 9.2:

a = ida_kernwin.find_widget("IDA View-A")
ida_kernwin.PluginForm.TWidgetToPySideWidget(a)

AttributeError                            Traceback (most recent call last)
Cell In[14], line 1
----> 1 ida_kernwin.PluginForm.TWidgetToPySideWidget(a)

File <retracted>\IDA\python\ida_kernwin.py:9083, in PluginForm.TWidgetToPySideWidget(tw, ctx)
   9079     ctypes.pythonapi.PyCapsule_New.argtypes = [ctypes.c_void_p,
   9080         ctypes.c_char_p, ctypes.c_void_p]
   9081     tw = ctypes.pythonapi.PyCapsule_New(ptr_l, PluginForm.
   9082         VALID_CAPSULE_NAME, 0)
-> 9083 return ctx.QtGui.QWidget.FromCapsule(tw)

AttributeError: module '__main__' has no attribute 'QtGui'

Thanks for bringing this up. We’ve heard you, but we need to test it a bit more. Expect the updates coming soon!

Just following up - these missing attributes should be fixed in the upcoming release.

1 Like