maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Sailfish SDK version 1608 (2.0.2) Qt5 released (https://talk.maemo.org/showthread.php?t=89294)

marmistrz 2013-09-03 16:23

Re: Sailfish SDK Alpha Qt5 released
 
What's the difference between RowLayout from QtQuick.Layouts and Row from QtQuick 2.0? And what about QtQuick.Controls 1.0? Sailfish SDK indicates its presence but the emulator doesn't find the module installed.

rainisto 2013-09-04 07:44

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by marmistrz (Post 1371686)
Yep, I didn't copy main.cpp. If I didn't register the type, I couldn't use it at all :)

This is a workaround which might work at this case, but what if it wasn't a signleton object? Is there some special magic about non-singleton objects and destructors?

/edit: I tried to use the context property approach, but it says that settings is not defined:

Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));

    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");

    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    Settings settings_object;
    view->rootContext()->setContextProperty("settings", &settings_object);
   
    Sailfish::showView(view.data());

    return app->exec();
}

Guess it's because of too late setting the context property, but I have no idea how to fix it.

Yes, setContextProperty must be called before main.qml is loaded. Like this:

Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));

    QScopedPointer<QQuickView> view(Sailfish::createView());
    Settings settings_object;
    view->rootContext()->setContextProperty("settings", &settings_object);
    Sailfish::setView(view.data(), "main.qml");
   
    Sailfish::showView(view.data());

    return app->exec();
}

That way you have global settings-property that you can access from qml without need to import anything etc.

marmistrz 2013-09-13 16:46

Re: Sailfish SDK Alpha Qt5 released
 
Hi,

I'm trying to create a nice font picker, but I'm having problems with highlighting:

Code:

import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.Silica.theme 1.0

Dialog
{
    property string selectedFont
    DialogHeader
    {
        id: header
        acceptText: "Select font"
    }
    SilicaListView
    {
        anchors.top: header.bottom
        anchors.bottom: parent.bottom
        spacing: Theme.paddingSmall
        model: Qt.fontFamilies()
        delegate: ListItem
        {
            id: listItem
            contentHeight: 60
            width: parent.width
            Label
            {
                id: label
                text: modelData
                anchors.left: parent.left
                anchors.leftMargin: Theme.paddingLarge
                color: listItem.highlighted ? Theme.highlightColor : Theme.primaryColor
              //  color: Theme.primaryColor
                //height: 60
            }
            onHighlightedChanged: console.log(highlighted)
        }
        VerticalScrollDecorator {}
    }
}

I used the MenuPage.qml from component gallery as a reference. But the listItem is never highlighted. tried copying the delegate and still never highlighted. What am I doing wrong?

marmistrz 2013-09-16 08:54

Re: Sailfish SDK Alpha Qt5 released
 
The solution was to define header like that
Code:

Dialog
{
    id: root
    SilicaListView
    {
        header: DialogHeader
        {
            id: header
            acceptText: "Select font"
        }
        /**/
    }
}


minimos 2013-09-18 16:10

Re: Sailfish SDK Alpha Qt5 released
 
From a tweet @JollaHQ:
Quote:

Some minor updates to #SailfishOS SDK available, paving the way for future updates. Details and instructions here: https://lists.sailfishos.org/piperma...er/000738.html
and from the above mentioned details:
Quote:

We have now uploaded a minor update of Sailfish SDK, which will update
your SailfishOS SDK IDE (based on QtCreator), fix some issues in
examples, update documentation and bring updates to your SDK Build Engine.

We didn't change much and in fact this is paving way to a bigger update
coming soonish and making sure everything on the update flow works ok.

<continue with update instructions>

xerxes2 2013-10-07 18:40

Re: Sailfish SDK Alpha Qt5 released
 
So I was sniffing around in the emulator a bit looking for /etc/os-release but only found some older files detecting Mer, ie system-release. It seems as there is no way of properly detecting Sailfish atm.

MartinK 2013-10-07 18:59

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1379203)
So I was sniffing around in the emulator a bit looking for /etc/os-release but only found some older files detecting Mer, ie system-release. It seems as there is no way of properly detecting Sailfish atm.

Is there lsb_release ? And if it is, what does:
Code:

lsb_release -a
say ?

xerxes2 2013-10-07 19:04

Re: Sailfish SDK Alpha Qt5 released
 
It also detects Mer.

Edit: And no /etc/vconsole.conf either. Adding it yourself works though, thankfully, as using a us layout with a eu/swedish keyboard is a real pita.

Code:

# /etc/vconsole.conf
KEYMAP="sv-latin1"


xerxes2 2013-10-08 12:25

Re: Sailfish SDK Alpha Qt5 released
 
Is there a way to upgrade to qt-5.1.x in the SDK? I've got pyqt-5.0.1 to build now but I got an error when import:
Code:

>>> from PyQt5 import QtQuick
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/python2.7/site-packages/PyQt5/QtQml.so: undefined symbol: _ZN11QQmlPrivate10createIntoI13QPyQmlObject5EEvPv

More people got this error but I haven't seen a solution yet so thought I should try pyqt-5.1 too if possible.

Edit: I got a response on the pyqt mailing list that this should be fixed in pyqt-5.1 but that version doesn't build with qt-5.0.x.

Edit2: I'm not sure the response makes sense for Sailfish x86 though.
http://www.riverbankcomputing.com/pi...er/033293.html

rcolistete 2013-10-08 13:54

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1379308)
Is there a way to upgrade to qt-5.1.x in the SDK?

Jolla said by Twitter that a new SDK release is coming shortly, possibly with Qt 5.1.

Quote:

Originally Posted by xerxes2 (Post 1379308)
I've got pyqt-5.0.1 to build now

Nice. You could share how you have built it and (after SDK update with Qt 5.1) publish to Mer-Project OBS.

xerxes2 2013-10-09 10:27

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1379325)
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.

xerxes2 2013-10-09 18:54

Re: Sailfish SDK Alpha Qt5 released
 
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.

mikecomputing 2013-10-09 20:54

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1379673)
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?

xerxes2 2013-10-09 21:05

Re: Sailfish SDK Alpha Qt5 released
 
Success!!! I managed to upgrade the sdk and get a hello world pyqt to run. Was I THE first? :D

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.

xerxes2 2013-10-09 21:06

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1379680)
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.

xerxes2 2013-10-11 10:59

Re: Sailfish SDK Alpha Qt5 released
 
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.

mikecomputing 2013-10-11 11:37

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1379682)
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?

xerxes2 2013-10-11 12:17

Re: Sailfish SDK Alpha Qt5 released
 
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.

rcolistete 2013-10-11 14:04

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1379968)
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.

Quote:

Originally Posted by mikecomputing (Post 1379968)
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.

mikecomputing 2013-10-11 17:16

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1379975)
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....

xerxes2 2013-10-12 12:32

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380019)
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?

For me personally not that much but porting from Pyside to Pyotherside will require a lot of work anyway. Porting from Pyside to Pyqt5 is very easy as shown below:

Pyside: https://github.com/xerxes2/panucci/b...lui/qmlmain.py

Pyqt5: https://github.com/xerxes2/panucci/b...ui/qml2main.py

As I said I'm not using much Qt stuff other than Quick but porting to Pyotherside will still, if even possible, require a lot of work. Pyqt maps 1:1 with the C++ API and is very easy to use if you already used Pyside before.

And would you care to explain why Pyotherside would use less resources than Pyqt? They're both using the same Qt libs so give some proof or it didn't happen. :P Use Pyotherside if you want but for existing Pyside apps Pyqt is the much faster way to port. Pyqt is GPL3 though so your app must use that license too or you must purchase a commercial license.

Edit: Just to clarify, porting from Pyside to Pyqt5 is basically namespace changes but porting to Pyotherside will require a complete rewrite of your gui and some more stuff. I've never used Pyotherside so someone correct me if I'm wrong.

mattaustin 2013-10-12 12:38

Re: Sailfish SDK Alpha Qt5 released
 
I've just ported my "Perth Trains" app to pyotherside. It's probably a bit hacky (I struggled with knowing which data types pyotherside will handle, a list of instances didn't work, but a list of dicts apparently does), and I plan to also port to pyqt at some point (just out of self-interest, and I already use pyside for fremantle/harmattan):

https://github.com/mattaustin/freman...f675729e773f35

mikecomputing 2013-10-12 13:26

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1380152)
For me personally not that much but porting from Pyside to Pyotherside will require a lot of work anyway. Porting from Pyside to Pyqt5 is very easy as shown below:

Pyside: https://github.com/xerxes2/panucci/b...lui/qmlmain.py

Pyqt5: https://github.com/xerxes2/panucci/b...ui/qml2main.py

As I said I'm not using much Qt stuff other than Quick but porting to Pyotherside will still, if even possible, require a lot of work. Pyqt maps 1:1 with the C++ API and is very easy to use if you already used Pyside before.

And would you care to explain why Pyotherside would use less resources than Pyqt? They're both using the same Qt libs so give some proof or it didn't happen. :P Use Pyotherside if you want but for existing Pyside apps Pyqt is the much faster way to port. Pyqt is GPL3 though so your app must use that license too or you must purchase a commercial license.

Edit: Just to clarify, porting from Pyside to Pyqt5 is basically namespace changes but porting to Pyotherside will require a complete rewrite of your gui and some more stuff. I've never used Pyotherside so someone correct me if I'm wrong.

THP has already pointed that out in a blog post. pyotherside does not load Qt via Python. This means it has not to lookup all Qt methods in python. Its actually other way around. Python is loaded from Qt thats atleast for now makes it alpot faster startup.

Morpog 2013-10-12 13:43

Re: Sailfish SDK Alpha Qt5 released
 
Performance comparision by THP himself on QtDevDays 2013
https://pbs.twimg.com/media/BWHgLHNIEAANIuf.jpg:large


Some other pics from there:
https://pbs.twimg.com/media/BWHizsjIIAAnX6v.jpg:large https://pbs.twimg.com/media/BWHfNSmIIAA_LEu.jpg:large https://pbs.twimg.com/media/BWHizsjIIAAnX6v.jpg:large https://pbs.twimg.com/media/BWHo-wnIQAALBYs.jpg:large https://pbs.twimg.com/media/BWHeAnkIcAAgS-W.jpg:large

xerxes2 2013-10-12 15:34

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380167)
THP has already pointed that out in a blog post. pyotherside does not load Qt via Python. This means it has not to lookup all Qt methods in python. Its actually other way around. Python is loaded from Qt thats atleast for now makes it alpot faster startup.

That's not proof, only talk. :p Also what's the point of seeing the gui faster if you can't use it until the rest of your app is loaded? A hello world Pyqt5/QML takes less than 2mb on my box and I really can't see a problem with that.

Edit: Hm, that should be less than 20mb ... still not extremely much. So it probably takes "a bit" more than Pyotherside.

Edit2: If I'm counting correctly a hello world pyqt5 takes around 14mb.

Edit3: Are you supposed to use qmlscene with pyotherside? Because that will use the same amount of memory as pyqt.

xerxes2 2013-10-12 15:37

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mattaustin (Post 1380154)
I've just ported my "Perth Trains" app to pyotherside. It's probably a bit hacky (I struggled with knowing which data types pyotherside will handle, a list of instances didn't work, but a list of dicts apparently does), and I plan to also port to pyqt at some point (just out of self-interest, and I already use pyside for fremantle/harmattan):

https://github.com/mattaustin/freman...f675729e773f35

If you do port it to Pyqt5 too you can make a real world comparison between the two ports and check memory usage.

mikecomputing 2013-10-12 20:27

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1380196)
That's not proof, only talk. :p Also what's the point of seeing the gui faster if you can't use it until the rest of your app is loaded? A hello world Pyqt5/QML takes less than 2mb on my box and I really can't see a problem with that.

Edit: Hm, that should be less than 20mb ... still not extremely much. So it probably takes "a bit" more than Pyotherside.

Edit2: If I'm counting correctly a hello world pyqt5 takes around 14mb.

Edit3: Are you supposed to use qmlscene with pyotherside? Because that will use the same amount of memory as pyqt.

Talk? well I trust in the fact he points out in the blog and also the fact that python apps has dogslow startup on N9. But if you still beleive pyQT is faster or better then its upto you but so far you have nothing that convince me that PyQt is a good idea on embedded platforms.

Also there is other reason I prefer the later. That is license issues...

Btw if gpodder who has ALOT of pythonqt code can be converted I think other apps can be.

rcolistete 2013-10-13 03:14

Re: Sailfish SDK Alpha Qt5 released
 
As thp says in his blog article about PyOtherSide :
Quote:

I've brought down startup time of gPodder on the N9 down from ~ 12 seconds (using Python 2 and PySide) to ~ 3 seconds (using Python 3.3 and the lightweight "PyOtherSide" approach)
So it seems PyOtherSide is lighter to install and load than PyQt/PySide.

But developers want and need freedom and options. Let remember that many Python mobile developers have only some hours per week or month to develop as a hobby, so if there are tools easier to migrate (from Maemo/MeeGo/PC) to Sailfish, they will want them. Some of the Python softwares could be developed in C/C++, but then it would take more developing time and some would not be finished at all.

And please, stop saying mobile Python developers are lazy. They contributed and will contribute with a lot of free and open source softwares for Maemo, MeeGo, Sailfish, etc.

mikecomputing 2013-10-13 09:56

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1380283)
As thp says in his blog article about PyOtherSide :

So it seems PyOtherSide is lighter to install and load than PyQt/PySide.

But developers want and need freedom and options. Let remember that many Python mobile developers have only some hours per week or month to develop as a hobby, so if there are tools easier to migrate (from Maemo/MeeGo/PC) to Sailfish, they will want them. Some of the Python softwares could be developed in C/C++, but then it would take more developing time and some would not be finished at all.

And please, stop saying mobile Python developers are lazy. They contributed and will contribute with a lot of free and open source softwares for Maemo, MeeGo, Sailfish, etc.

As I already said. OpenSource is about contribute if main coders has no time I could definitivly understand that. But thing is there is so many people here bashing about XYZ and why is not that Open source why is not Jolla HW good enought and so on. Now if that time could be used on making apps/port apps etc it would be better for all.

There is also other stuff that may involve porting. Going from Python2 => python3.

And btw. We definitively not need too many alternatives librarys IMHO. Especially not on embedded linux.

It only leads to massive package dependies hell that we know of in the Linux on desktop :(

MartinK 2013-10-13 10:43

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380329)
And btw. We definitively not need too many alternatives librarys IMHO. Especially not on embedded linux.

Ever heard about using the best tool for the job ?
You can never have enough libraries available - library availability is what makes or breaks a platform for developers.

Also the more libraries are are available in the repositories, the less crap developers have to bundle, meaning smaller packages and less security vulnerabilities caused by outdated bundled libs.

mikecomputing 2013-10-13 10:47

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by MartinK (Post 1380336)
Ever heard about using the best tool for the job ?
You can never have enough libraries available - library availability is what makes or breaks a platform for developers.

Also the more libraries are are available in the repositories, the less crap developers have to bundle, meaning smaller packages and less security vulnerabilities caused by outdated bundled libs.

Yes but many libs doing the same thing.

But when there are big transitions like now people still want to use old deprecated librarys even if they are not best suited for the job in the longer run...

I still is not convinced PyQt is not the best tool for the job. Because if you access so much of the core Qt this days its probadly because the app is using QtWidgets and that stuff will be less and less used also on Linux desktop whenm QtComponents is more stable (that also means less UI fragmentaion between embedded and desktop hopefully..)

xerxes2 2013-10-13 11:44

Re: Sailfish SDK Alpha Qt5 released
 
So I did some testing on memory usage for Qt5 ...

This is memory usage for hello world QML:

C++: 14mb
Pyotherside: 15.3mb
Pyqt5: 17mb

The results are calculated by starting the app and run "free", close the app and run free again. So yes Pyotherside takes less memory than Pyqt but not much. The C++ and Pyotherside apps were running of this code:
Code:

#include <QGuiApplication>
#include <QQuickView>


int main(int argc, char* argv[])
{
    QGuiApplication *app = new QGuiApplication(argc, argv);
    QQuickView *view = new QQuickView;
    view->setSource(QUrl::fromLocalFile(argv[1]));
    view->show();

    return app->exec();
}

And smaller than that I don't think is possible.

xerxes2 2013-10-13 11:51

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380338)
Yes but many libs doing the same thing.

But when there are big transitions like now people still want to use old deprecated librarys even if they are not best suited for the job in the longer run...

I still is not convinced PyQt is not the best tool for the job. Because if you access so much of the core Qt this days its probadly because the app is using QtWidgets and that stuff will be less and less used also on Linux desktop whenm QtComponents is more stable (that also means less UI fragmentaion between embedded and desktop hopefully..)

For existing Maemo apps written in Pyside/Pyqt4 it's very easy to port to Sailfish with Pyqt5. You're forced to use the GPL license but other than that it seems to work just fine in the Sailfish emulator. For new apps you might wanna stick to Pyotherside though ... but you will not have the whole Qt C++ API then either.

qwazix 2013-10-13 12:53

Re: Sailfish SDK Alpha Qt5 released
 
15Mb for hello world...

I remember when the Nokia n-gage had what, 24mb of ram?

MartinK 2013-10-13 14:13

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by qwazix (Post 1380362)
15Mb for hello world...

I remember when the Nokia n-gage had what, 24mb of ram?

I kinda wonder - most of that should library code, should that be shared automatically ? You now, Qt is used as a shared library in this context. :)

EDIT:
BTW, have you tried to import PyQt from the PyOtherSide Python code ? Might be a nice hack to get fast startup & access to the PyQt non-GUI stuff at the cost of some RAM usage. :)

rcolistete 2013-10-13 17:32

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380329)
There is also other stuff that may involve porting. Going from Python2 => python3.

And btw. We definitively not need too many alternatives librarys IMHO. Especially not on embedded linux.

It only leads to massive package dependies hell that we know of in the Linux on desktop :(

Many Python modules are not (yet) available to Python 3.x. So it is better to have both Python 2.6/2.7 & 3.x on Sailfish OS.

More programming languages and tools = more software will be written / ported to Sailfish OS.

Package dependencies hell ? Sorry, but hell is Android which doesn't have dependencies at all and the developer has to included everything inside the .apk (Python, Qt, PyQt/PySide/PyOtherSide, NumPy, MatPlotLib, etc). Something that takes 1h developing directly on Nokia N900/N9 (including packaging and sending to repository) can take many hours using full Android SDK on PC.

rcolistete 2013-10-13 17:47

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380338)
Yes but many libs doing the same thing.

But when there are big transitions like now people still want to use old deprecated librarys even if they are not best suited for the job in the longer run...

PyQt/PySide don't do the samething of PyOtherSide. Period.

PyQt is not deprecated, it is being developed, with PyQt 5.1 version released this month, following the huge Qt 5.x developments.

Quote:

Originally Posted by mikecomputing (Post 1380338)
I still is not convinced PyQt is not the best tool for the job.

Ok, so let you don't use PyQt. And let others, who think otherwise, use it. Ok ?

I hate programming Fortran, but I think others may need it so I support to have gFortran on Maemo, MeeGo, Sailfish, Ubuntu Touch, etc.

Quote:

Originally Posted by mikecomputing (Post 1380338)
Because if you access so much of the core Qt this days its probadly because the app is using QtWidgets and that stuff will be less and less used also on Linux desktop whenm QtComponents is more stable (that also means less UI fragmentaion between embedded and desktop hopefully..)

Please, nobody, nobody here is using or is planning to use QtWidgets on Sailfish !

PyQt allow to use the full Qt API : multimedia, network, SQL, sensors interface, etc. Not only GUI (in Qt Quick or QtWidgets).

mikecomputing 2013-10-13 18:01

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1380404)
Many Python modules are not (yet) available to Python 3.x. So it is better to have both Python 2.6/2.7 & 3.x on Sailfish OS.

More programming languages and tools = more software will be written / ported to Sailfish OS.

Package dependencies hell ? Sorry, but hell is Android which doesn't have dependencies at all and the developer has to included everything inside de .apk (Python, Qt, PyQt/PySide/PyOtherSide, NumPy, MatPlotLib, etc). Something that takes 1h developing directly on Nokia N900/N9 (including packaging and sending to repository) can take many hours using full Android SDK on PC.

All I am saying is its time to think forward. Depending on old python or old librarys is wrong and leads to maintainer/dependies hell. My guess is that Jolla will have python3 as default.

And If X/Y/Z lib is not working with Python 3 it really is time to port them. Again stuff changes. Its 2013 not 2010 were the last 2 series was released. There will happen alot in this area on Linux desktop to.

So I dont see why MER or sailfish should add every damn library to an embedded linux platform. I personally will dish those apps/libs for sure. I already doing that on Linux desktop.

I could definitivly understand that MER is avoiding as much as possible to make a cleaner embedded Linux dist. And if they later dish Python 2 I don't blame them. But I guess there is plenty of people at TMO that will disagree. Because they don't want to use never libs and instead prefer triplecore CPU and 8Gb RAM so they can run every damn existing library at the same time. Because thats what will happen if X/YZ library and X/Y/Z intepreters has to be run at the same time.

We need a stable platform not half million apps "because its cool to have all those old apps" even if they will not integrate well on a 4" screen anyway.

I know we can run X/Y/Z desktop application on N9/N900 but how productive is it to run all those apps? Often they also look real crap especially when they use GtkWidgets or QtWidgets instead of modern Tablet/smartphone UI:s.

There is another reason to avoid non platform libs. The endusers they doint want to add every damn repository out there just to get one app working.

qwazix 2013-10-13 21:50

Re: Sailfish SDK Alpha Qt5 released
 
On the other hand it's the multitude of libraries that made the N900 so useful and still has more productivity tools than possibly any other phone. And I prefer gnumeric on the N900 that any of the braindead mobile office suites that barely work except as a viewer because of touch controls.

rcolistete 2013-10-14 00:46

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380416)
All I am saying is its time to think forward. Depending on old python or old librarys is wrong and leads to maintainer/dependies hell. My guess is that Jolla will have python3 as default.

See the 1st post, Python 2.7.3 is default on Sailfish SDK. Python 2.7.5 and 3.3.2 are current Python production versions.

About "old" Python releases :
- 2.5.6 was the last Python 2.5 security fix, released on 05/2011;
- 2.6 has security fixes until 10/2013.

While Python 2.7 :
- was released in 07/2010 and it is expected to have new releases until 2015 at least;
- it is the current Python version in the majority of current Linux distributions;
- is/will be still used in Linux distributions where Python 3.x is/will be the default version.

For example, Ubuntu 14.04 will have Python 3.3 as default version, but Python 2.7.x will still be available in repository as many modules are still in version 2.7. Some of Python modules have hundreds of thousands of source-code lines, the migration task takes more than a year.

From what I see in Mer/Nemo repositories, I bet new Sailfish SDK will have Python 2.7.5 as default and Python 3.3 available to install.

Quote:

Originally Posted by mikecomputing (Post 1380416)
There is another reason to avoid non platform libs. The endusers they doint want to add every damn repository out there just to get one app working.

What ? Is it difficult to enable Maemo extras/extras-devel repository on Maemo 5 ? And Mer/Nemo repositories accept contributions from the community, I bet there will be something like Sailfish "extras" repository for community 3rd party softwares.


All times are GMT. The time now is 13:12.

vBulletin® Version 3.8.8