Search code examples
pythonreverse-engineeringdisassemblyida

IDA Python + Qt. How can I insert my own tab into IDA main tab widget?


I'm developing my first IDA Pro plugin in Python 3 + PyQt5 using IDA API.

Now I'm able to create any detached window (QMainWindow, QDialog, etc.) with any contents but I want to insert it into the IDA main tab widget (like "IDA View-A", "Hex View-1", etc.) (see Image 1 with IDA built-in script editor) or somehow add a gray bar "Drag this title to dock somewhere else" in the top of the window (see Image 2). Is there any API function for that?

Thanks.

Image 1

image 1

Image 2

image 2


Solution

  • I found the answer by myself. It's IDA API class ida_kernwin.PluginForm.

    Here is a blog post that shows the usage example. It's from 2010, but it still works: https://hex-rays.com/blog/ida-pro-python-and-qt/

    Just a little remark, to use it with PyQt instead of PySide you should call self.FormToPyQtWidget() instead of self.FormToPySideWidget() in OnCreate() method.