maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Python & Qt5 on Sailfish (https://talk.maemo.org/showthread.php?t=91049)

EmaNymton 2015-01-15 10:45

Re: Python & Qt5 on Sailfish
 
Ok, I found a way that worked for me!

If you use sailfish-qml to start your PyOtherSide/QML application you have to place your qm-translation files in a folder called translations.

Translation files are supposed to be named "<appname>-<lang>.qm" in "/usr/share/<appname>/translations/"

That works for me, found it at the source code of sailfishlib project:
https://github.com/sailfish-sdk/libs...shapp_priv.cpp

forestbird 2015-03-22 21:14

Re: Python & Qt5 on Sailfish
 
Hello.

I've tried to install PyQt on Jolla, but got the error about failed dependencies:

"Qt5Multimedia.WIdgets.so.5 is needed by python-pyqt-5.1.1-1.armv7hl"

And the same error occurs while trying to install Panucci.

Is there a way to install the missing module?

MartinK 2015-07-18 15:18

Re: Python & Qt5 on Sailfish
 
Quote:

Originally Posted by otsaloma (Post 1477111)
Any advice on how to handle translations of strings in Python code? In particular when doing string formatting in Python and the unformatted string should be subject to translation.

Is there a way to access ts-file data from Python without importing some huge PyQt? Or am I just wrong to put strings in Python and should move them all to QML? The whole Qt translation system seems very primitive compared to gettext.

https://github.com/otsaloma/poor-maps/issues/1

What about using gettext for the Python part and the Qt thing for the QML part ?

marmistrz 2016-08-07 11:25

Re: Python & Qt5 on Sailfish
 
Why is Jolla so reluctant to support PyQt5 in Harbour?

MartinK 2016-08-07 11:35

Re: Python & Qt5 on Sailfish
 
Quote:

Originally Posted by marmistrz (Post 1511933)
Why is Jolla so reluctant to support PyQt5 in Harbour?

Maybe because it's so much larger than PyOtherSide ? PyQt attepmts to wrap and make accessible all Qt 5 classes while PyOtherSide is just a light RPC interface for QML.

In any case it would be a good idea to raise the issue on the Community Meeting. :)

MartinK 2017-01-29 23:11

Re: Python & Qt5 on Sailfish
 
I've just submitted a merge request for updating PyOtherSide in Sailfish OS from 1.4 to 1.5:
https://git.merproject.org/mer-core/...rge_requests/2

If it is accepted by maintainers it these are the main features that will be available to Python application developers:
  • Support for OpenGL rendering in Python using PyOpenGL >= 3.1.0
  • New QML components: PyGLArea, PyFBO
  • pythonVersion() now returns the runtime Python version
  • Add the library to PYTHONPATH for standard library appended as .zip (except on Windows)
  • Call PyDateTime_IMPORT as often as necessary (Fixes #46)
  • Added pyotherside.format_svg_data for using SVG data in the image provider
  • Handle converting QVariantHash to Python dict type
  • Added .qmltypes file to provide metadata information for Qt Creator
  • New functions importNames() and importNames_sync() for from-imports

MartinK 2017-04-24 14:15

Re: Python & Qt5 on Sailfish
 
My PyOtherSide update request (to version 1.5.1) has been merged, and should be (according to Larstiq on IRC) part of the Sailfish OS Update that comes after the next one (2.1.0 + 2 updates). So let's hope the Sailfish OS update cycle speeds up now that Qt 5.6 is in and we can soon make use of all the nice new features and fixes of the updated PyOtherSide. :)


All times are GMT. The time now is 19:49.

vBulletin® Version 3.8.8