[PyQt] PyQt + QtWinMigrate

Christoph Buelter c.buelter at arcor.de
Mon Feb 9 20:18:20 GMT 2015


>  Hello,
>
> I am trying to create a python binding for the QtWinMigrate 
> <https://qt.gitorious.org/qt-solutions/qt-solutions/source/67a72e3bc2e49ffc9e99b9845b1c314bf86f6941:qtwinmigrate>library 
> on Windows, but I am having problems with the final steps.
> I managed to build sip, Qt 4.8.5 and PyQt 4.11.3. There are existing 
> sip files for QtWinMigrate at: https://github.com/glennra/PyQtWinMigrate
>
> Now here is the part I am not really sure about:
>
> I copied the sip files to: C:\PyQt-win-gpl-4.11.3\sip and tried to run:
> cd C:\PyQt-win-gpl-4.11.3\sip
> sip -c . -I . QtWinMigrate.sip
>
> Which fails with:
> sip: Q_PID is undefined
>
> I then tried:
> sip -c . -I . -t WS_WIN QtWinMigrate.sip
>
> Which fails with:
> sip: HWND is undefined
>
> So either way something is missing and I have no idea how to add it.
>
> Any ideas what I am doing wrong?
>
> Cheers,
> Chris

Hi,

I am pretty close to building Python bindings for QtWinMigrate using 
these sip files <https://github.com/glennra/PyQtWinMigrate>, Qt 4.8.5, 
Python 2.7.3 and nmake on Windows.

I have my own little configure.py to use sip's build system to create a 
Makefile, sipAPI*.h and sip*.cpp files based on the QtWinMigrate.sip.
The two needed moc files I created manually like: moc -o 
moc_qwinwidget.h qwinwidget.h
Please see the complete Makefile here: http://pastebin.com/WG1WRTGw

However the Makefile somehow misses some includes, which I added 
manually (line 8, headers for Qt and QtWinMigrate).
It also seems to expect a QtWinMigrate.lib, which I am not sure how to 
create and setup properly.

When I build the qtwinmigrate project using:
cd qtwinmigrate
configure -library
qmake
nmake
it will build a .dll, .exp and .lib in the \lib directory, but named 
like QtSolutions_MFCMigrationFramework-head.lib.

Is that the one I need? How to reference it correctly in the Makefile?
Btw, do I have to reference the MFC libraries/headers somehow?

Thanks for your help,
Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150209/04b05933/attachment.html>


More information about the PyQt mailing list