[PyQt] Howto: build PyQt against Qt5 on Windows
Mathias.Born at gmx.de
Mathias.Born at gmx.de
Sun Jan 27 22:56:54 GMT 2013
Hi,
I'm so impressed by QML scene graph performance, I want it now. So this is
what I had to do to make PyQt build on Windows against Qt5, without webkit.
(sip-4.14.3-snapshot-dc06058c99dd and PyQt-win-gpl-snapshot-4.10-f0118624625e)
Attached is a new configure.py for PyQt and and new siputils.py for sip
(sorry, diff yourself).
Necessary changes to files:
qnetworkreply.sip:147
%If (PyQt_OpenSSL)
%If (Qt_5_0_0 -)
virtual void sslConfigurationImplementation(QSslConfiguration &) const;
%End
%If (Qt_5_0_0 -)
virtual void setSslConfigurationImplementation(const QSslConfiguration &);
%End
%If (Qt_5_0_0 -)
virtual void ignoreSslErrorsImplementation(const QList<QSslError> &);
%End
%End
qsslcertificateextension.sip:
Guard everything with
%If (PyQt_OpenSSL)
%End
qcoreapplication.sip:286
%If (- Qt_4_8_4)
virtual bool winEventFilter(MSG *message, long *result);
%End
Note: Implement QCoreApplication::installNativeEventFilter and QCoreApplication::removeNativeEventFilter instead.
qabstracteventdispatcher.sip:62
%If (WS_WIN)
virtual bool registerEventNotifier(QWinEventNotifier * notifier) = 0;
virtual void unregisterEventNotifier(QWinEventNotifier * notifier) = 0;
%End
QtCoremod.sip:136
%Include qwineventnotifier.sip
qwidget.sip:368
%If (- Qt_4_8_4)
virtual bool winEvent(MSG *message, long *result);
%End
409:
%If (- Qt_4_8_4)
WId winId() const;
%End
439:
%If (Qt_4_4_0 - Qt_4_8_4)
WId effectiveWinId() const;
%End
(The winId-methods still exist, but "WId" is an integral type in Qt5.)
qwizard.sip:145
%If (- Qt_4_8_4)
bool winEvent(MSG *message, long *result);
%End
qsizegrip.sip:52
%If (- Qt_4_8_4)
bool winEvent(MSG *m, long *result);
%End
qprinter.sip:178
%If (!WS_WIN)
QString printerSelectionOption() const;
void setPrinterSelectionOption(const QString &);
%End
qpixmap.sip:157
%If (- Qt_4_8_4)
%If (WS_WIN)
// Windows specific conversion functions.
enum HBitmapFormat
{
NoAlpha,
PremultipliedAlpha,
%If (Qt_4_5_0 -)
Alpha,
%End
};
HBITMAP toWinHBITMAP(QPixmap::HBitmapFormat format = QPixmap::NoAlpha) const;
static QPixmap fromWinHBITMAP(HBITMAP bitmap, QPixmap::HBitmapFormat format = QPixmap::NoAlpha);
%If (Qt_4_6_0 -)
HICON toWinHICON() const;
static QPixmap fromWinHICON(HICON icon);
%End
%End
%End
In Qt5, the QtGui module depends on Qt5PrintSupportd.lib.
Add NOMINMAX to the DEFINES list of qmake.conf in the mkspecs folder corresponding to your
compiler (e.g. build\mkspecs\win32-msvc2012 for VS2012).
Remove pylupdate from the main Makefile. Needs further attention.
Phil, may this help you get things to work on Windows.
Best Regards,
Mathias Born
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qwineventnotifier.sip
Type: application/octet-stream
Size: 219 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130127/6e7e60ea/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: siputils.py
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130127/6e7e60ea/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure.py
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130127/6e7e60ea/attachment-0003.ksh>
More information about the PyQt
mailing list