Menu

Building Issue Qt5.3

Help
2014-10-11
2015-08-13
  • Emmanuel Nicolas

    Hi,

    When building pythonqt with the latest qt (5.3 here) and python (3.3 or 3.4), I end up with a failed build:

    In file included from /usr/include/qt5/QtGui/qbrush.h:53:0,
                     from /usr/include/qt5/QtGui/QBrush:1,
                     from ../generated_cpp_53/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.h:2,
                     from ../generated_cpp_53/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.cpp:1:
    /usr/include/qt5/QtGui/qpixmap.h: In member function QPixmap PythonQtWrapper_QPixmap::static_QPixmap_fromImageInPlace(QImage&, Qt::ImageConversionFlags):
    /usr/include/qt5/QtGui/qpixmap.h:176:20: erreur: static QPixmap QPixmap::fromImageInPlace(QImage&, Qt::ImageConversionFlags) is protected
         static QPixmap fromImageInPlace(QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
                        ^
    ../generated_cpp_53/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.cpp:3013:49: erreur: à l'intérieur du contexte
       return (QPixmap::fromImageInPlace(image, flags));
                                                     ^
    

    Solution is to remove the declaration and implementation of PythonQtWrapper_QPixmap::static_QPixmap_fromImageInPlace in generated_cpp_53/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.{h,cpp}

    Happened both on Mac OS X 10.9, and Fedora 20.

    I do not know why this fails?

    Moreover, on Mac OS X, I had to move the include of iostream to the top of file PythonQt.h, otherwise this raises some error in the XCode framework.

     
  • Florian Link

    Florian Link - 2014-10-11

    I don't understand why this builds on visual studio.
    I think the generator does not handle protected static methods right at the moment, I will exclude the method in the generator files on Monday.
    Probably it is the only protected static method in whole Qt...

    Will move iostream to the top as well.

     
  • Sergey

    Sergey - 2014-10-12

    Maybe because of this (com_trolltech_qt_gui_builtin0.h, trunk 354):
    @@ -815,7 +814,6 @@

    class PythonQtPublicPromoter_QPixmap : public QPixmap
    { public:
    -friend class PythonQtWrapper_QPixmap;

     
  • Florian Link

    Florian Link - 2014-10-13

    I fixed the generator, it now correctly promotes static methods. The QPixmap::fromImageInPlace is the only protected static method all over Qt 5...

    The generated_53 files are fixed as well.

    I moved the iostream include to the top. If there are any other Mac issues, please let me know, I only have an older Mac build with Qt 4.8 running.

     
  • Emmanuel Nicolas

    Commit 372 (https://sourceforge.net/p/pythonqt/code/372/) removed this, could you fix it again in the svn code?

    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.