Qt 4.8.4 on Windows for IDA Pro C/C++ plug-in development – Part 1 of 3

(Note this an advanced article.  It assumes you know advanced C++, IDA Pro and it’s plug-in environment, etc).

Now that IDA Pro has completely moved to Qt for it’s user interface you can really expand on it to make your own custom Qt user interfaces in IDA.  You’re not locked in to using just IDA’s varied but basic UI system.

If you want to use Python for IDA there is already a featured setup using PySide but then maybe you want to use Qt from IDA’s C/C++ plug-in SDK (for speed and resource control, etc.)

The development environment for IDA Qt is version 4.8.4 and Visual Studio 2010.
You can clearly see this looking at the DLLs in the IDA Pro folder:DLL image showing Qt 4.8.4

DLL image showing Visual Studio 2010

But then who wants to use 2010 when you already have VS2013 or later (2015 is in beta as I write this)?
You can have both installed of course, but the right way is to install the oldest one you need first, then on to the latest .
If you don’t do it this way you will probably get stuck with environment variables from the old or end up with something else messed up.

You can actually use VS2013 to make Qt UI’s just fine as I do.
After all the Qt import libraries are already there for us in the IDA SDK folder “\lib\x86_win_qt”.
We are mainly going to use a Qt 4.8.4 install for the needed “\4.8.4\include” includes,  and a few executables like the “Qt designer”, some of the build tools, and maybe the Qt resource compiler all located in the “\4.8.4\bin” folder.

You don’t have too and you probably won’t want to build Qt to VS2013 (if even possible), you just won’t be able to build full-on Qt 4.8.4 applications with this setup.

1) First go get the binary build of Qt 4.8.4 here (234mb):

2) Install it. Typically it will go to “C:\Qt”.
Do not build, just install it.

3) Bring up your start menu down to “Qt by Digia v4.8.4..” and open a “Qt 4.8.4 Command Prompt”.

4) In the IDA setup the QT namespace environment is used to avoid a few conflicts in the IDA SDK with colliding functions like qstrlen(), etc.
Run in this console:
configure -debug-and-release -platform win32-msvc2010 -no-qt3support -qtnamespace QT
Choose the ‘o’ open source option and ‘y’ to the license agreement to complete the process.

That’s all you need to do now.  You could run “nmake” to build but you don’t need and probably don’t want to.
It would take several hours to rebuild the whole thing and the folder would grow to several gigabytes in size.  Just close the console and your done for now.

Go to part 2

On topic:
Hex Blog: IDA Pro, Python and Qt
Hex Blog: IDA & Qt: Under the hood

© 2015-2021 Sirmabus. All Rights Reserved