Re: [SailfishDevel] Python and Qt Widgets development possible?
Em 16-02-2014 12:40, christopher.l...@thurweb.ch escreveu: Dietmar Sailfish is very far from being QML only. Sailfish like all other platforms based on Qt5.X supports a rich mix of C++, QML and Javascript. The exact mix is up to you, and depends on your own experience, preferences and predilections, and of course on what you need to do. The death of Qt Widgets is nothing to with Sailfish, that is q Qt5.X thing. Grüsse Chris Long before Qt5 : with MeeGo Harmattan 1.2 in 2011, Qt Widgets were not supported to develop for Nokia N9. So Qt Quick 1.0 QML is not new at all. ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Is Qt Quick faster on desktop too? -- Marcin 2014-02-17 13:12 GMT+01:00 Roberto Colistete Jr. roberto.colist...@gmail.com: Em 16-02-2014 12:40, christopher.l...@thurweb.ch escreveu: Dietmar Sailfish is very far from being QML only. Sailfish like all other platforms based on Qt5.X supports a rich mix of C++, QML and Javascript. The exact mix is up to you, and depends on your own experience, preferences and predilections, and of course on what you need to do. The death of Qt Widgets is nothing to with Sailfish, that is q Qt5.X thing. Grüsse Chris Long before Qt5 : with MeeGo Harmattan 1.2 in 2011, Qt Widgets were not supported to develop for Nokia N9. So Qt Quick 1.0 QML is not new at all. ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Death? The folks on qt project said that qt widgets isn't gonna be dropped. -- Marcin 2014-02-16 16:40 GMT+01:00 christopher.l...@thurweb.ch: Dietmar Sailfish is very far from being QML only. Sailfish like all other platforms based on Qt5.X supports a rich mix of C++, QML and Javascript. The exact mix is up to you, and depends on your own experience, preferences and predilections, and of course on what you need to do. The death of Qt Widgets is nothing to with Sailfish, that is q Qt5.X thing. Grüsse Chris Zitat von Dietmar Schwertberger maill...@schwertberger.de: Thanks for the hints. I've come to the conclusion that for me it's not yet time to make the switch from N900 to Jollaas main device. (The main blocking point is lack of calendar synchronization with Outlook on a PC.) So I will probably have enough time to learn QML... But IMHO restricting GUI to QML only is a mistake. Such a limitation of tools stops software frombeing ported, written and/orpublished. The unique selling point of Jolla / Sailfish OScould be thatit's as versatile as a PC. But QML only reduces this very much to being just another Smartphone platform.If the N900 had been QML only, then I would have bought an Android device instead. Of course I understand that the resources of Jolla are limited and that priorities are somewhere else. Regards, Dietmar ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Hi, On 2014-02-11 21:15, Dietmar Schwertberger wrote: I tried my Maemo/Fremantle app without a theme. As I would like to stay compatible to Maemo and Windows, I would prefer the QtWidgets solution for some time. Even if you were to use QtWidgets (which I strongly suggest not using), you would still have to manage Qt 4 vs. Qt 5 differences (as you probably won't be able to use Qt 5 on Maemo, and even if, I don't think the Maemo 5 themeing has been forward-ported to Qt 5). You can stay compatible with Maemo 5 and Windows by using QtQuick 2.0 as well: - For Maemo 5, use pure QtQuick 2.0 (or use the QtQuick 2 port of Qt Quick Components[1]) - For Windows (and Linux, Mac OS X) use Qt Quick Controls[2] [1] https://github.com/nemomobile/qt-components/tree/qtquick2 [2] http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html The major problems: - When I open a second window, on Maemo I use the stacked windows attribute. On Sailfish that's not available, so a second window opens. The second window then is shown on its own in the multitasking view. This could probably be fixed using QStackedWidgets, though. Don't open a new window; just show the view inside the first window. Only having one window open also means that the window manager has a much easier time doing memory management, as it doesn't need to keep hidden surfaces around, and the toolkit (Qt Scene Graph in the case of Qt 5) can presumably do a much better job of not rendering / storing a screenful of every page. This isn't really a Sailfish OS-related problem, though. - The menu bar is shown just like in Windows not as pulleye. When you open the menu, again a full window is opened. Don't use menu bars. That's a WIMP[3] paradigm that doesn't necessarily apply to touch interfaces. [3] http://en.wikipedia.org/wiki/WIMP_%28computing%29 If I had the same problems on Windows, I would assume that I could get the (window) handles of the underlying windows/widgets/whatever and do some win32 calls to fix the problems. Maybe on Sailfish that's possible as well, but there's no documentation... Some inspiration for doing cross-platform Python application development using Qt 5, Python 3 and PyOtherSide (assuming the subject of this threads is still relevant): - Core and glue code, plus Desktop and generic QML UI: https://github.com/gpodder/gpodder-ui-qml - Sailfish UI: https://github.com/gpodder/gpodder-sailfish The core and glue code (main.py and stuff in common/ in gpodder-ui-qml) is used by all UIs. The Desktop UI (desktop/ in gpodder-ui-qml, very barebones) uses Qt Quick Controls and gives you native UIs for Linux, Mac OS X and Windows. The generic QML UI is just using pure QtQuick 2.0 and can be used on (touch-based) platforms for which you haven't written a UI yet. And then for every platform you want to target specifically (such as Sailfish OS), just use the common code and write a native UI on top of that, with the native components set - that'd be Sailfish Silica for Sailfish OS, Ubuntu Components for Ubuntu Touch, Cascades on Blackberry 10 [yeah, no qt5 - ignore that for now], etc... With Qt Quick Controls, the excuse I want it to also work on the Desktop doesn't work anymore. QML is good. Awesomest article in that area is probably still the one from Attila, which I highly recommend you read: http://achipa.blogspot.co.at/2011/07/qt-components-story-of-ugly-qwidgetling.html HTH :) Thomas ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
This site answers both your questions: https://harbour.jolla.com/faq 1. QWidgets are unsupported on Sailfish because they are not mobile-optimized and not hardware accelerated. 2. Python will be supported but isn't yet. On Sun, Jan 26, 2014 at 1:33 PM, Dietmar Schwertberger maill...@schwertberger.de wrote: Hi! Until now I have been using PySide to write Qt Widgets applications that were running fine under Windows and Maemo. With some if/else I got native look feel on both platforms. Now I've tried the same with PyQt5 on Sailfish OS and the application looks like a Windows application and even opens new windows when I e.g. open the menu. Unfortunately it seems that QML is the only way to get native look and feel. Am I right? Switching to QML/Qt Quick seems a major effort and especially, it is very un-pythonic to use this mixture of two languages. Even when I switch, it seems that there's quite some effort to stay compatible over multiple platforms as you more or less have to use Silica components on Sailfish OS and on the other hand I won't gain usability on a mouse based platform like Windows. With Maemo I had the impression that it was quite easy to port any GUI application and get at least a reasonable UI. Seems that this is not true with Sailfish OS any more. You have to choose between all or nothing... Regards, Dietmar ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Actually you don't need Harbour to develop what you want ;) On 11.02.2014 20:09, Timur Kristóf wrote: This site answers both your questions: https://harbour.jolla.com/faq 1. QWidgets are unsupported on Sailfish because they are not mobile-optimized and not hardware accelerated. 2. Python will be supported but isn't yet. On Sun, Jan 26, 2014 at 1:33 PM, Dietmar Schwertberger maill...@schwertberger.de mailto:maill...@schwertberger.de wrote: Hi! Until now I have been using PySide to write Qt Widgets applications that were running fine under Windows and Maemo. With some if/else I got native look feel on both platforms. Now I've tried the same with PyQt5 on Sailfish OS and the application looks like a Windows application and even opens new windows when I e.g. open the menu. Unfortunately it seems that QML is the only way to get native look and feel. Am I right? Switching to QML/Qt Quick seems a major effort and especially, it is very un-pythonic to use this mixture of two languages. Even when I switch, it seems that there's quite some effort to stay compatible over multiple platforms as you more or less have to use Silica components on Sailfish OS and on the other hand I won't gain usability on a mouse based platform like Windows. With Maemo I had the impression that it was quite easy to port any GUI application and get at least a reasonable UI. Seems that this is not true with Sailfish OS any more. You have to choose between all or nothing... Regards, Dietmar ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Am 11.02.2014 16:51, schrieb Marcin M.: Don't know much about Qt theming capability but you could try installing some custom theme for plain Qt, as Maemo does. But sitll there'll be no native lookfeel Themes would only change the look. Things like dialogs, multiple windows, menus etc. still would not behave as expected. Regards, Dietmar ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
But they could make the UI usable on mobile phones, as it's done in Fremantle. I can send you a screenshot with the app themed and not themed. -- Marcin 2014-02-11 19:07 GMT+01:00 Dietmar Schwertberger maill...@schwertberger.de : Am 11.02.2014 16:51, schrieb Marcin M.: Don't know much about Qt theming capability but you could try installing some custom theme for plain Qt, as Maemo does. But sitll there'll be no native lookfeel Themes would only change the look. Things like dialogs, multiple windows, menus etc. still would not behave as expected. Regards, Dietmar ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Am 11.02.2014 20:14, schrieb Marcin M.: But they could make the UI usable on mobile phones, as it's done in Fremantle. I can send you a screenshot with the app themed and not themed. I tried my Maemo/Fremantle app without a theme. As I would like to stay compatible to Maemo and Windows, I would prefer the QtWidgets solution for some time. The major problems: - When I open a second window, on Maemo I use the stacked windows attribute. On Sailfish that's not available, so a second window opens. The second window then is shown on its own in the multitasking view. This could probably be fixed using QStackedWidgets, though. - The menu bar is shown just like in Windows not as pulleye. When you open the menu, again a full window is opened. If that could be fixed using a theme, that would really be cool, but I have my doubts that this is possible. If I had the same problems on Windows, I would assume that I could get the (window) handles of the underlying windows/widgets/whatever and do some win32 calls to fix the problems. Maybe on Sailfish that's possible as well, but there's no documentation... Regards, Dietmar ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
On Tuesday 11 February 2014 21.15.48 Dietmar Schwertberger wrote: Am 11.02.2014 20:14, schrieb Marcin M.: But they could make the UI usable on mobile phones, as it's done in Fremantle. I can send you a screenshot with the app themed and not themed. You better ask yourself this: 1. If endusers have to download from thirdparty warehouse that provides QtWidgets+XWayland less users will use you app. 2. I doubt QtWidgets apps will be userfriendly and probadly not integrate well with sailfishUI and slow since already stated QtWidget is not accelerated on embedded platforms. 3. And why not learn QML(for the UI) when linux desktop OS:es will use QML more frequently lately? for example ubuntu unity and KDEFramework5? That way you still can use QtWidgets on windows until QML2 ported to windows8. Its new times get over it think fresh think new ;) Just IMHO... Regards Mikael -- Skickat från Lenovo Thinkpad X230 running Kubuntu desktop ___ SailfishOS.org Devel mailing list
[SailfishDevel] Python and Qt Widgets development possible?
Hi! Until now I have been using PySide to write Qt Widgets applications that were running fine under Windows and Maemo. With some if/else I got native look feel on both platforms. Now I've tried the same with PyQt5 on Sailfish OS and the application looks like a Windows application and even opens new windows when I e.g. open the menu. Unfortunately it seems that QML is the only way to get native look and feel. Am I right? Switching to QML/Qt Quick seems a major effort and especially, it is very un-pythonic to use this mixture of two languages. Even when I switch, it seems that there's quite some effort to stay compatible over multiple platforms as you more or less have to use Silica components on Sailfish OS and on the other hand I won't gain usability on a mouse based platform like Windows. With Maemo I had the impression that it was quite easy to port any GUI application and get at least a reasonable UI. Seems that this is not true with Sailfish OS any more. You have to choose between all or nothing... Regards, Dietmar ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Hi Dietmar Zitat von Dietmar Schwertberger maill...@schwertberger.de: Switching to QML/Qt Quick seems a major effort and especially, it is very un-pythonic to use this mixture of two languages. There is only one language here, QML, which is an extension of javascript. Qt Quick is a set of components used by QML. This component set is further extended by the Sailfish Silica component set. I did not find QML itself that hard to learn, and there are lots of examples and tutorials on the interweb. The mix of 2 languages comes when need to do some heavy-lifting and have to fall back to C++. Having said that C++ and QML are well integrated. Zitat von Dietmar Schwertberger maill...@schwertberger.de: ...there's quite some effort to stay compatible over multiple platforms You have hit the nail on the head. Multiplatform coding is not easy, especially if you want to keep native interaction, and look and feel. We know that Sailfish is quite a bit different from any other platform. Multi-platform is not impossible, but it does involve compromises. I have been working for some while to port a Harmattan app to Sailfish. For the most part I have got it working, but not without some obstacles. Off the top of my head (and without going into detail), here is a list of differences I found between these 2 platforms 1) Qt Version 4.7.4 -- 5.x 2) QtQuick version 1.0 -- 2.0 3) Mobility 1.2 -- Qt 5.0 equivalents 4) Project Template Files C++ main function, Pro file 5) Project structure 6) Sailfish look and feel, user interaction 7) Sailfish Specials: e.g Cover 8) Missing QML Components / Extra Components, 9) Component Property differences 10) Library differences inc. Bugs 11) Niggly Technical Stuff 11.1) How a javascript file imports a second javascript file 11.2) Location of LocalStorage DB 12) Harbour rules (somethings are technically possible, but not allowed to be harbour compliant) 13) etc Grüsse Chris ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Python and Qt Widgets development possible?
Just a thought - maybe using some legacy (i.e. Fremantle) theme could be a fix. But I have no idea whether it can be done and with how much effort. -- Marcin 2014-01-26 christopher.l...@thurweb.ch Hi Dietmar Zitat von Dietmar Schwertberger maill...@schwertberger.de: Switching to QML/Qt Quick seems a major effort and especially, it is very un-pythonic to use this mixture of two languages. There is only one language here, QML, which is an extension of javascript. Qt Quick is a set of components used by QML. This component set is further extended by the Sailfish Silica component set. I did not find QML itself that hard to learn, and there are lots of examples and tutorials on the interweb. The mix of 2 languages comes when need to do some heavy-lifting and have to fall back to C++. Having said that C++ and QML are well integrated. Zitat von Dietmar Schwertberger maill...@schwertberger.de: ...there's quite some effort to stay compatible over multiple platforms You have hit the nail on the head. Multiplatform coding is not easy, especially if you want to keep native interaction, and look and feel. We know that Sailfish is quite a bit different from any other platform. Multi-platform is not impossible, but it does involve compromises. I have been working for some while to port a Harmattan app to Sailfish. For the most part I have got it working, but not without some obstacles. Off the top of my head (and without going into detail), here is a list of differences I found between these 2 platforms 1) Qt Version 4.7.4 -- 5.x 2) QtQuick version 1.0 -- 2.0 3) Mobility 1.2 -- Qt 5.0 equivalents 4) Project Template Files C++ main function, Pro file 5) Project structure 6) Sailfish look and feel, user interaction 7) Sailfish Specials: e.g Cover 8) Missing QML Components / Extra Components, 9) Component Property differences 10) Library differences inc. Bugs 11) Niggly Technical Stuff 11.1) How a javascript file imports a second javascript file 11.2) Location of LocalStorage DB 12) Harbour rules (somethings are technically possible, but not allowed to be harbour compliant) 13) etc Grüsse Chris ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list