[PyQt] Building PyQt5.7 with Qt5.6: issues

Phil Thompson phil at riverbankcomputing.com
Wed Oct 26 14:02:56 BST 2016


On 26 Oct 2016, at 1:40 pm, Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
> 
> Hello,
> 
> According to
> http://pyqt.sourceforge.net/Docs/PyQt5/introduction.html#an-explanation-of-version-numbers:
> 
> """
> Therefore, for PyQt5 v5.n.* the following are true.
> 
>    It will build against any version of Qt v5, but will not support
>    any new features introduced in Qt v5.n+1 or later.
> """
> 
> Unfortunately, we are seeing build issues when building PyQt5.7 against
> Qt5.6. Here are some of the issues we are seeing:
> 
> - sipQtCoreQRect.cpp:1552:40: error: 'const class QRect' has no member
>   named 'transposed'
> 
>   And indeed the transposed() method in QRect was added in Qt5.7, so
>   it's not available in Qt5.6. See
>   http://doc.qt.io/qt-5/qrect.html#transposed.
> 
>   More build log available at:
>   http://autobuild.buildroot.net/results/030/0306710e0f39591dba74f24aff40f7f094bcfa6e/build-end.log
> 
> - sipQtCoreQIODevice.cpp:1627:30: error: 'const class QIODevice' has
>   no member named 'readChannelCount'
> 
>   sipQtCoreQIODevice.cpp:1652:30: error: 'const class QIODevice' has
>   no member named 'writeChannelCount'
> 
>   writeChannelCount() was also introduced in Qt 5.7, see
>   http://doc.qt.io/qt-5/qiodevice.html#writeChannelCount.
> 
> - sipQtCoreQMetaObject.cpp:1086:30: error: 'const struct QMetaObject'
>   has no member named 'inherits'
> 
>   The inherits() method of QMetaObject was also added in Qt 5.7, see
>   http://doc.qt.io/qt-5/qmetaobject.html#inherits
> 
> So, is it really supported to build PyQt5.7 with Qt5.6, like the PyQt
> website claims? Or am I reading the PyQt website incorrectly?
> 
> Thanks for your input,

The problem is that PyQt knows nothing about Qt v5.6.2 and assumes it must be a later version.

As a workaround you can edit the QtCoremod.sip file and insert Qt_5_6_2 before Qt_5_7_0 in the %Timeline directive.

Phil


More information about the PyQt mailing list