Reply
Thread Tools
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#171
Originally Posted by rcolistete View Post
Nice. You could share how you have built it and (after SDK update with Qt 5.1) publish to Mer-Project OBS.
Yeah sure, the race is on for being the first to get pyqt to work properly in the sailfish sdk!

First you need to install some stuff with zypper:
Code:
zypper in qt5*
zypper in python-devel
zypper in meego-rpm-config
And then you need to build sip:
Code:
Name: sip
Version: 4.15.2
Release: 1
Summary: SIP - Python/C++ Bindings Generator

#Group:
License: GPLv3
URL: http://riverbankcomputing.co.uk/sip
Source: http://surfnet.dl.sourceforge.net/project/pyqt/sip/sip-%{version}/sip-%{version}.tar.gz
#BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires: python-devel
#Requires:

%description
SIP is a tool for generating bindings for C++ classes so that they can be
accessed as normal Python classes. SIP takes many of its ideas from SWIG but,
because it is specifically designed for C++ and Python, is able to generate
tighter bindings. SIP is so called because it is a small SWIG.

%prep
%setup -q


%build
python configure.py
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT

%files
%{_bindir}/*
%{_libdir}/*
%{_includedir}/*

%doc

%changelog
And last pyqt:
Code:
Name: pyqt
Version: 5.0.1
Release: 1
Summary: PyQt - Python bindings for Qt5

#Group:
License: GPLv3
URL: http://riverbankcomputing.co.uk/pyqt
Source0: http://surfnet.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-%{version}/PyQt-gpl-%{version}.tar.gz
#BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

#BuildRequires:
Requires: sip

%description
These are Python bindings for Qt5.

%prep
%setup -q -n PyQt-gpl-%{version}


%build
python configure.py --confirm-license --verbose
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL_ROOT=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT

%files
%{_bindir}/*
%{_libdir}/*
%{_datadir}/*

%doc

%changelog
It takes a while to build pyqt ... but hopefully it'll work better with qt-5.1.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).
 

The Following 2 Users Say Thank You to xerxes2 For This Useful Post:
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#172
Ok so I managed to update qt on the sdk and got the newest snapshot of pyqt to work. But I can't get a hello world app to actually show up in the emulator. Using silica gives an import error and using only raw qml is not working either. There is a warning spitting out "libEGL warning: DRI2: failed to authenticate", dunno if that's the problem? So the app is running but doesn't show up graphically ... maybe I need a .desktop file to make it work?

Edit: Nope, didn't work with a desktop file either.

Edit2: I got an old sdk so must upgrade and now mers repo server is down so will take some time until I can test again.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).

Last edited by xerxes2; 2013-10-09 at 20:19.
 

The Following 2 Users Say Thank You to xerxes2 For This Useful Post:
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#173
Originally Posted by xerxes2 View Post
Ok so I managed to update qt on the sdk and got the newest snapshot of pyqt to work. But I can't get a hello world app to actually show up in the emulator. Using silica gives an import error and using only raw qml is not working either. There is a warning spitting out "libEGL warning: DRI2: failed to authenticate", dunno if that's the problem? So the app is running but doesn't show up graphically ... maybe I need a .desktop file to make it work?

Edit: Nope, didn't work with a desktop file either.

Edit2: I got an old sdk so must upgrade and now mers repo server is down so will take some time until I can test again.
I dont get why use PyQT when we already knows that pyotherside will be faster and probadly uses less resources also?
__________________
Keep safe and healthy
 
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#174
Success!!! I managed to upgrade the sdk and get a hello world pyqt to run. Was I THE first?

Packages here: http://enlisy.org/~xerxes2/pkg/sailfish/

You need both sip and pyqt. And you need to use Silicas ApplicationWindow to make it work as only raw qml doesn't work.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).
 

The Following 3 Users Say Thank You to xerxes2 For This Useful Post:
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#175
Originally Posted by mikecomputing View Post
I dont get why use PyQT when we already knows that pyotherside will be faster and probadly uses less resources also?
From what I've seen from pyotherside it's a completely different thing than to use pyside or pyqt.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).
 

The Following 2 Users Say Thank You to xerxes2 For This Useful Post:
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#176
So everything seems to work just fine in the emulator, even got sound to work, except ... the Component.onDestruction signal doesn't seem to work. Anyone else noticed this? And the emulator doesn't seem to support landscape mode, though Silica does. The UX is very slow though but hopefully it'll run a bit faster on real hardware. It wouldn't hurt though if it was faster in vbox too ...

Edit: And the aboutToQuit signal doesn't work either when closing an app from the UX.

Edit2: I can't get the onDestruction signal to work on my desktop either.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).

Last edited by xerxes2; 2013-10-11 at 14:13.
 

The Following User Says Thank You to xerxes2 For This Useful Post:
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#177
Originally Posted by xerxes2 View Post
From what I've seen from pyotherside it's a completely different thing than to use pyside or pyqt.
yes but fact is everything points to that pyother takes less resources and means less mem used and so on.

many apps on n9 written in pyqt/pyside is dogslow startup may I tell one of the reasons?
__________________
Keep safe and healthy

Last edited by mikecomputing; 2013-10-11 at 11:41.
 
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#178
If you only want to use QML then you can use Pyotherside but if you want to use the whole Qt C++ API you'll have to use PyQt.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).
 

The Following 3 Users Say Thank You to xerxes2 For This Useful Post:
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#179
Originally Posted by mikecomputing View Post
yes but fact is everything points to that pyother takes less resources and means less mem used and so on.
Some points were already explained to have PyQt on Sailfish OS :
- PyQt 5/Qt5 API is a lot richer than PyOtherSide & Python & QML API, see the above post;
- there are many PyQt softwares on Maemo 4&5, desktop PC which use a lot of Qt API, so they could be ported to Sailfish if the GUI is ported to QML;
- more developer options = more softwares on Sailfish OS.

From MeeGo Harmattan & (old) Nemo Mobile to Sailfish OS, many PySide & QML softwares would be easily ported to PyOtherSide & QML as they don't use a lot of Qt API, the rest would be easier to port using PyQt 5.

Originally Posted by mikecomputing View Post
many apps on n9 written in pyqt/pyside is dogslow startup may I tell one of the reasons?
I bet that the majority of Python softwares from Maemo & MeeGo will be ported to Sailfish using PyOtherSide (mine included), so they will be faster to load. Like gPodder :
https://devdays.kdab.com/?page_id=225#3

Well, nowawadays many users want everything, iDon't & etc users want all softwares installed and then open in 0.005s, even if it is something like LibreOffice mobile. Due to this thinking, we have a dumbing down mobile world with Android, iOS, etc (even Ubuntu Touch at least v13.10) without (3rd party or non-default) dependencies, so software bloated and less capable.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2013-10-11 at 15:30.
 

The Following 3 Users Say Thank You to rcolistete For This Useful Post:
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#180
Originally Posted by xerxes2 View Post
If you only want to use QML then you can use Pyotherside but if you want to use the whole Qt C++ API you'll have to use PyQt.
what Qt C++ API do you need to access from Python when you almost can access the most via QML? and other sutable libs in python or via pyotherside? QtNetwork stuff? No there is urllib. QtWidgets? No because that is no go on embedded anyway. It maybe cool but definitivly not productive. There could ofcourse be stuff that is not accesable right now but if so tell it so it could be solved

To be more clear:

Shouldn't we care more to make optimized apps that uses less resources? People often says: Android is bloated cause of dalvik blablabla. And now we seem to do the same mistake by sometime lazyness?

people cries like crazy about "Jollas specs is to old and to less memory and should have better CPU blabla" I guess the actuall reason is: Its to less because we want to run big librarys because the community is to lazy port apps to pyotherside.

Don't get me wrong here. I KNOW it maybe sometime will take alot of time and resources. But still.

If stuff can be ported to pyotherside it should be done. If maintainer has now time, well we all should help him/her because isn't that what opensource is about? All this crying about everything should be open? Isn't open source about contribute give back and help each other? Or why else should apps be open?

If more people started contribute I am sure most of the stuff could be ported to pyotherside and we would get faster cool apps...

Btw. It would also be good if Mer/sail moved away from Python2.x to 3.x series inmstead because thats were the linux desktop also is heading....
__________________
Keep safe and healthy

Last edited by mikecomputing; 2013-10-11 at 17:38.
 

The Following User Says Thank You to mikecomputing For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:33.