[PyQt] PyQt on Sailfish OS

Dietmar Schwertberger maillist at schwertberger.de
Mon Jan 5 14:03:31 GMT 2015


Hi!

Is anyone successfully using PyQt (GPL) on a recent version of Sailfish OS?
I can't build it in the mersdk build engine.
(Sailfish OS Qt version is 5.2.2.)

E.g. with sip 4.16.5 or 4.15.5 and PyQt 5.2.1 I get

  /home/mersdk/PyQt-gpl-5.2.1/QtWidgets/sipQtWidgetsQGraphicsLayout.cpp: 
In member function 'virtual void 
sipQGraphicsLayout::getContentsMargins(qreal*, qreal*, qreal*, qreal*) 
const':
  /home/mersdk/PyQt-gpl-5.2.1/QtWidgets/sipQtWidgetsQGraphicsLayout.cpp:241:75: error: cannot convert 'qreal* {aka float*}' to 'double*' for argument '5' to 'void sipVH_QtWidgets_116(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper*, PyObject*, double*, double*, double*, double*)'


And with sip 4.16.5 and PyQt 5.4

  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCoreQLocale.cpp:2289:39: error: 
'Akoose' is not a member of 'QLocale'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCoreQLocale.cpp:2623:39: error: 
'Lakota' is not a member of 'QLocale'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCoreQLocale.cpp:2880:58: error: 
'StandardMoroccanTamazight' is not a member of 'QLocale'

After removing these entries from the sipQtCoreQLocale.cpp:
  /home/mersdk/PyQt-gpl-5.4/sip/QtCore/qstorageinfo.sip:34:26: fatal 
error: qstorageinfo.h: No such file or directory

After removing any references and files for qstorageinfo:
  g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC 
-DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN 
-DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I. 
-I/usr/include/python3.4m -I../qpy/QtCore -I/usr/include/qt5 
-I/usr/include/qt5/QtCore -I. -o sipQtCorecmodule.o sipQtCorecmodule.cpp
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp: In function 
'PyObject* func_qFloatDistance(PyObject*, PyObject*)':
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:6522:42: error: 
'qFloatDistance' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp: In function 
'PyObject* func_qFormatLogMessage(PyObject*, PyObject*)':
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:6708:62: error: 
'qFormatLogMessage' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp: In function 
'PyObject* slot_Qt_MouseEventFlag___or__(PyObject*, PyObject*)':
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8483:9: error: 
'MouseEventFlag' is not a member of 'Qt'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8483:28: error: 
expected ';' before 'a0'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8484:9: error: 
'MouseEventFlags' is not a member of 'Qt'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8484:30: error: 
'a1' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8487:93: error: 
'a0' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8489:13: error: 
'MouseEventFlags' is not a member of 'Qt'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8489:33: error: 
'sipRes' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8491:26: error: 
expected type-specifier
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8491:26: error: 
expected ';'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp: In function 
'PyObject* slot_Qt_Edge___or__(PyObject*, PyObject*)':
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8521:9: error: 
'Edges' is not a member of 'Qt'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8521:20: error: 
'a1' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8526:13: error: 
'Edges' is not a member of 'Qt'
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8526:23: error: 
'sipRes' was not declared in this scope
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8528:26: error: 
expected type-specifier
  /home/mersdk/PyQt-gpl-5.4/QtCore/sipQtCorecmodule.cpp:8528:26: error: 
expected ';'


With the latest sip and PyQt snapshots I also get the messages on Locale 
and qstorageinfo. At that point I stopped trying...

Regards,

Dietmar




More information about the PyQt mailing list