Orochimarufan / PythonQt

PythonQt fork featuring Qt 5.x and Python 3.x support and improved CMake build system
GNU Lesser General Public License v2.1
48 stars 20 forks source link

PythonQt should working on Mac OS Yosemite? #8

Closed supergis closed 9 years ago

supergis commented 9 years ago

I am get this project, and compile using QT Create 5.4 on Yosemite,But got error, Should anyone get some suggestion?

supergis commented 9 years ago

Detail error as:

In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:199:10: warning: 'PythonQtWrapper_QAbstractButton::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAbstractButton* theWrappedObject, QEvent*  e);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:226:9: warning: 'PythonQtWrapper_QAbstractButton::timerEvent' hides overloaded virtual function [-Woverloaded-virtual]
   void timerEvent(QAbstractButton* theWrappedObject, QTimerEvent*  e);
        ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:437:18: note: hidden overloaded virtual function 'QObject::timerEvent' declared here: different number of parameters (1 vs 2)
    virtual void timerEvent(QTimerEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:561:23: error: 'DropIndicatorPosition' is a protected member of 'QAbstractItemView'
   QAbstractItemView::DropIndicatorPosition  dropIndicatorPosition(QAbstractItemView* theWrappedObject) const;
                      ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:337:10: note: declared protected here
    enum DropIndicatorPosition { OnItem, AboveItem, BelowItem, OnViewport };
         ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:625:74: error: 'State' is a protected member of 'QAbstractItemView'
   void setState(QAbstractItemView* theWrappedObject, QAbstractItemView::State  state);
                                                                         ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:292:10: note: declared protected here
    enum State {
         ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:635:23: error: 'State' is a protected member of 'QAbstractItemView'
   QAbstractItemView::State  state(QAbstractItemView* theWrappedObject) const;
                      ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:292:10: note: declared protected here
    enum State {
         ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:565:10: warning: 'PythonQtWrapper_QAbstractItemView::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAbstractItemView* theWrappedObject, QEvent*  event);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:639:9: warning: 'PythonQtWrapper_QAbstractItemView::timerEvent' hides overloaded virtual function [-Woverloaded-virtual]
   void timerEvent(QAbstractItemView* theWrappedObject, QTimerEvent*  event);
        ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:437:18: note: hidden overloaded virtual function 'QObject::timerEvent' declared here: different number of parameters (1 vs 2)
    virtual void timerEvent(QTimerEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:960:10: warning: 'PythonQtWrapper_QAbstractScrollArea::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAbstractScrollArea* theWrappedObject, QEvent*  arg__1);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:961:10: warning: 'PythonQtWrapper_QAbstractScrollArea::eventFilter' hides overloaded virtual function [-Woverloaded-virtual]
   bool  eventFilter(QAbstractScrollArea* theWrappedObject, QObject*  arg__1, QEvent*  arg__2);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:117:18: note: hidden overloaded virtual function 'QObject::eventFilter' declared here: different number of parameters (2 vs 3)
    virtual bool eventFilter(QObject *, QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1079:10: warning: 'PythonQtWrapper_QAbstractSlider::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAbstractSlider* theWrappedObject, QEvent*  e);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1102:9: warning: 'PythonQtWrapper_QAbstractSlider::timerEvent' hides overloaded virtual function [-Woverloaded-virtual]
   void timerEvent(QAbstractSlider* theWrappedObject, QTimerEvent*  arg__1);
        ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:437:18: note: hidden overloaded virtual function 'QObject::timerEvent' declared here: different number of parameters (1 vs 2)
    virtual void timerEvent(QTimerEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1219:10: warning: 'PythonQtWrapper_QAbstractSpinBox::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAbstractSpinBox* theWrappedObject, QEvent*  event);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1259:9: warning: 'PythonQtWrapper_QAbstractSpinBox::timerEvent' hides overloaded virtual function [-Woverloaded-virtual]
   void timerEvent(QAbstractSpinBox* theWrappedObject, QTimerEvent*  event);
        ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:437:18: note: hidden overloaded virtual function 'QObject::timerEvent' declared here: different number of parameters (1 vs 2)
    virtual void timerEvent(QTimerEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1533:10: warning: 'PythonQtWrapper_QAction::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QAction* theWrappedObject, QEvent*  arg__1);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1657:10: warning: 'PythonQtWrapper_QApplication::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QApplication* theWrappedObject, QEvent*  arg__1);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1933:10: warning: 'PythonQtWrapper_QCalendarWidget::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QCalendarWidget* theWrappedObject, QEvent*  event);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:1934:10: warning: 'PythonQtWrapper_QCalendarWidget::eventFilter' hides overloaded virtual function [-Woverloaded-virtual]
   bool  eventFilter(QCalendarWidget* theWrappedObject, QObject*  watched, QEvent*  event);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:117:18: note: hidden overloaded virtual function 'QObject::eventFilter' declared here: different number of parameters (2 vs 3)
    virtual bool eventFilter(QObject *, QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:2052:10: warning: 'PythonQtWrapper_QCheckBox::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QCheckBox* theWrappedObject, QEvent*  e);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:2340:78: error: 'CursorAction' is a protected member of 'QAbstractItemView'
   QModelIndex  moveCursor(QColumnView* theWrappedObject, QAbstractItemView::CursorAction  cursorAction, Qt::KeyboardModifiers  modifiers);
                                                                             ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:266:10: note: declared protected here
    enum CursorAction { MoveUp, MoveDown, MoveLeft, MoveRight,
         ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:2461:10: warning: 'PythonQtWrapper_QComboBox::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QComboBox* theWrappedObject, QEvent*  event);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:1:
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.h:2608:10: warning: 'PythonQtWrapper_QCommandLinkButton::event' hides overloaded virtual function [-Woverloaded-virtual]
   bool  event(QCommandLinkButton* theWrappedObject, QEvent*  e);
         ^
/Users/wangpad/Qt/5.4/clang_64/lib/QtCore.framework/Headers/qobject.h:116:18: note: hidden overloaded virtual function 'QObject::event' declared here: different number of parameters (1 vs 2)
    virtual bool event(QEvent *);
                 ^
In file included from ../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:2:
../../../PythonQt/src/PythonQtConversion.h:471:23: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    PyObject* items = PyMapping_Items(val);
                      ^
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/abstract.h:1354:50: note: expanded from macro 'PyMapping_Items'
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
                                                 ^
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:4615:20: error: 'DropIndicatorPosition' is a protected member of 'QAbstractItemView'
QAbstractItemView::DropIndicatorPosition  PythonQtWrapper_QAbstractItemView::dropIndicatorPosition(QAbstractItemView* theWrappedObject) const
                   ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:337:10: note: declared protected here
    enum DropIndicatorPosition { OnItem, AboveItem, BelowItem, OnViewport };
         ^
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:4935:106: error: 'State' is a protected member of 'QAbstractItemView'
void PythonQtWrapper_QAbstractItemView::setState(QAbstractItemView* theWrappedObject, QAbstractItemView::State  state)
                                                                                                         ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:292:10: note: declared protected here
    enum State {
         ^
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:4985:20: error: 'State' is a protected member of 'QAbstractItemView'
QAbstractItemView::State  PythonQtWrapper_QAbstractItemView::state(QAbstractItemView* theWrappedObject) const
                   ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:292:10: note: declared protected here
    enum State {
         ^
../../../PythonQt/generated_cpp_53/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp:19975:104: error: 'CursorAction' is a protected member of 'QAbstractItemView'
QModelIndex  PythonQtWrapper_QColumnView::moveCursor(QColumnView* theWrappedObject, QAbstractItemView::CursorAction  cursorAction, Qt::KeyboardModifiers  modifiers)
                                                                                                       ^
../../../../Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qabstractitemview.h:266:10: note: declared protected here
    enum CursorAction { MoveUp, MoveDown, MoveLeft, MoveRight,
         ^
18 warnings and 8 errors generated.
make[2]: *** [com_trolltech_qt_gui0.o] Error 1
make[1]: *** [sub-PythonQt_QtAll-make_first] Error 2
make: *** [sub-extensions-make_first-ordered] Error 2
18:35:59: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project PythonQt (kit: Desktop Qt 5.4.0 clang 64bit)
supergis commented 9 years ago

Run CMake got error:

CMake Error at /opt/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
  Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required
  is at least "3.3" (found /usr/local/lib/libpython3.4m.a)
Call Stack (most recent call first):
  /opt/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:341 (_FPHSA_FAILURE_MESSAGE)
  /opt/local/share/cmake-3.0/Modules/FindPythonLibs.cmake:197 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:101 (find_package)
supergis commented 9 years ago

I am OK. by change all error "protected XXX" related member to "public" as following:

//Add "public" by openthings. This got error by PythonQt,change to public member.
public:
    enum Extension {
        UserExtension = 0x80000000
    };

Using QT Creator 5.4 on Yosemite 10.10, compile/run examples success! But, cmake still problems.