News for hackers. Stuff that matters.
Re:Qt 5.10 released by mherrmann on Thursday December 07, 2017 @09:03AM (#15870010)
I'm an indie dev and have been developing a cross-platform (Py)Qt app for the past 1.5 years (~2100 dev hrs) [0]. Given that Qt is cross-platform desktop development, it's very solid. But there are a lot of things one has to do that are not required for (say) web apps:

* Creating standalone executables / installers for the app itself is already not so easy (I use - and recommend - PyInstaller [1]).

* Code signing the executables so users don't get an ugly "this app is untrusted" warning is tedious for the three different platforms

* Auto-updating is a pain to implement as well. I'm using Google Omaha (same as Chrome) on Windows [2], Sparkle on Mac [3] and Debian packages / fpm on Linux [4]. In total, I probably spent two to three months just on auto-update functionality.

* You really can tell that Qt is "drawing pixels on screen". Sometimes you have to draw pixels / perform pixel calculations yourself. The built-in "CSS" engine QSS works to some extent, but often has unpredictable results and weird edge cases.

I considered Electron as well. But its startup performance is just prohibitive. I blogged about this (and which other technologies I considered) [5].

I've been wondering for a while whether I should not open source my solutions to all of the above problems, to save other people the months required getting everything to work. Would anybody be interested in that? It would be something like a PyQt alternative for Electron.

[edit] People are very interested so I'm starting a MailChimp list. If you want to know if/when I open source a solution then please subscribe at http://eepurl.com/ddgpnf.

[0]: https://fman.io

[1]: http://www.pyinstaller.org

[2]: https://fman.io/blog/google-omaha-tutorial/

[3]: https://sparkle-project.org/

[4]: https://github.com/jordansissel/fpm

[5]: https://fman.io/blog/picking-technologies-for-a-desktop-app-...

Re:Qt 5.10 released by evsasse on Thursday December 07, 2017 @10:11AM (#15870638)
Wow, never felt so connected to a hn reply. This is so similar to my experiences using PyQt, so it probably describes the experience of a lot of other devs out there.

We made a MVP using Electron but had to ditch it because of performance issues. PyQt seems like the best alternative, but the pain points you described were hard obstacles in the beginning.

* We gave up on making Omaha work, after some wasted weeks, and are using pywinsparkle to autoupdate on windows.

* The QSS feels buggy all around, the "border-radius" property is one of the simplest examples of that.

Would greatly appreciate some open-source solutions, examples or simply some blog posts of best-practices and how you are managing these pain points. :)

Re:Qt 5.10 released by mherrmann on Thursday December 07, 2017 @10:14AM (#15870681)
I mention bits and pieces on my app's blog [0]. But more interesting to you may be a Wiki I created on GitHub with the things I had to learn about PyQt the hard way [1].

[0]: https://fman.io/blog

[1]: https://github.com/mherrmann/pyqt-resources/wiki

Re:Qt 5.10 released by mherrmann on Thursday December 07, 2017 @10:21AM (#15870756)
Oh, and you may also be interested in a video I made of my app's release process on Win, Mac and Linux: https://youtu.be/uhIj9B2At28
Re:Qt 5.10 released by baldfat on Thursday December 07, 2017 @11:36AM (#15871482)
> Creating standalone executables / installers

Python's Achilles heel, this is what caused me to walk away from Python. I usually make short very specific programs and I work on multiple of sites. Python was a pain to make executables. I now try to use Racket for everything and it makes executableson Windows, Linux and Mac.

Has things really improved the last 2 years?

Re:Qt 5.10 released by zbentley on Friday December 08, 2017 @06:58AM (#15878147)
I've seen people use Docker for this purpose, even on Mac/Windows. Personally, that seems a bit like using a howitzer where a flyswatter will do, especially since a lot of performance gains are going to be negated by Docker's virtualization on Mac and Windows.
Re:Qt 5.10 released by nly on Thursday December 07, 2017 @05:00PM (#15874756)
It's not a python specific problem. I work on a native app on 3 platforms and have had the same distribution pains.
Re:Qt 5.10 released by user5994461 on Thursday December 07, 2017 @06:27PM (#15875348)
Qt apps are easy to ship. It's just copying a bunch of files. For windows, you can create an installer with InnoSetup, it's super easy.

I suppose the issue is distributing python.

Re:Qt 5.10 released by Siecje on Thursday December 07, 2017 @09:10AM (#15870058)
I would be interested in your packaging and auto updating solution.
Re:Qt 5.10 released by mherrmann on Thursday December 07, 2017 @09:18AM (#15870118)
I created a MailChimp list [0]. Everybody wanting to know if/when I open source this please subscribe there.

[0]: http://eepurl.com/ddgpnf

Re:Qt 5.10 released by aeroxis on Thursday December 07, 2017 @09:29AM (#15870200)
I evaluated Qt for one of my personal side projects and ended up going to electron for the reasons you mentioned. Electron, while simple to use, feels slow to launch and run on someone with hardware that is a few years older.
Re:Qt 5.10 released by rasjani on Thursday December 07, 2017 @10:03AM (#15870533)
Are electron binaries somehow pre-signed?
Re:Qt 5.10 released by panta on Thursday December 07, 2017 @02:10PM (#15872999)
Thanks for fman and for the transparency of your whole process. I am decidedly interested in your open-sourcing fman, I'll add myself to the subscription list. I have a suggestion: why don't you launch a kickstarter (or other more suitable campaign) to collect a fund acting as a payment for the open-sourcing of fman. That could compensate you for the tremendous effort that went in the development till now.
Re:Qt 5.10 released by mherrmann on Friday December 08, 2017 @01:24AM (#15877047)
I don't think I'd really get a lot of money on Kickstarter. if people want to financially support the project, they can simply get a license [0].

[0]: https://fman.io/buy

Re:Qt 5.10 released by panta on Friday December 08, 2017 @01:13PM (#15880610)
Yeah, I think I was one of the early licenses, but I was wondering if there was a way to open source it while preserving the financial benefits.
Re:Qt 5.10 released by mherrmann on Saturday December 09, 2017 @12:25PM (#15886818)
Thank you for having gotten a license. I've given it a lot of thought and don't think there is a way to open source and become financially viable. See for instance https://fman.io/blog/why-fman-isnt-open-source/.
Re:Qt 5.10 released by vram22 on Thursday December 07, 2017 @10:49AM (#15871050)
I'm interested, and signed up. Thanks for offering to do this.

Just as anecdata, I've tried out Qt w/C++ a bit earlier and what I tried, I found good. And I wrote some simple wxPython GUI wrappers for my xtopdf toolkit, that experience was good too.

I've also tried out PyInstaller a bit for both simple CLI and GUI (wxPython again) apps; that worked well too. It's an interesting piece of technology; I think it must be doing a lot of stuff.