Hacker News new | past | comments | ask | show | jobs | submit login
Python and Qt simplified (fman.io)
186 points by BerislavLopac on March 27, 2022 | hide | past | favorite | 91 comments



Free fbs doesn’t work with recent versions of python (>3.6) [0]. You need to pay or migrate. This can lead to security issues because recent packages don’t always work with older python versions.

[0] https://build-system.fman.io/manual/#requirements


This. Python 3.6 is out of support now, 3.11 is about to be released. It's not really usable anymore.


Not just on this project, but I've seen a few more not moving past 3.8 for support and I don't quite get why that's been happening. Did something happen on 3.9 or later that didn't caught my eye?


One reason could be that 3.8 is the last version to support Windows 7, which (despite EOL) is still widely used.


Maybe it's because Ubuntu LTS, currently 20.04, is on 3.8.


Somewhere around there is when python changed the collections.abc stdlib naming convention from a warning to a fatal error. This means that code could work fine in 3.8 ish and refuse to run on 3.9+.


That probably explains why when I try to use subuser commands (python3.10 installed on the system) it complains "AttributeError: module 'collections' has no attribute 'Mapping'"


A bit of a pain. But to be fair, this import was deprecated since python 3.3, released almost 10 years ago.


I think the correct link would, as of right now, be to the Requirements section:

https://build-system.fman.io/manual/#requirements


Ha, I used pyinstall and QT for the first time during a one off project. Smoothest GUI development I've ever done coming from knowing nothing about the stack. Esp. pyinstall. Had to do literally nothing for win/mac/unix builds.

To be fair though, it was a relatively simple app, but I feel that's the typical use case if you're already proficient in python and just want to add some buttons.

I don't hear about using this stack much, so I'm glad it's getting improvements + more attention!


At Vorta (https://github.com/borgbase/vorta/) we're also happy users of the PyQt + PyInstaller stack. Not really needed for Linux, but great for macOS. It's even possible to use Sparkle via PyObjc for automatic updates. Be sure to build "appdir" packages to get a proper macOS package that can be notarized with Apple.


I wrote a small Python program for a group of non-tech people, and all throughout development I was dreading how much time I was going to have to spend helping everyone through the installation process. But Pyinstaller made it as simple as "download and run". Super quick to set up and no one had issues at all.


Pyinstaller can be a nightmare depending on what dependencies you have. I believe it doesn't copy data files by default, so you have to either write a spec file for the library or include those files yourself in your program spec.

After everything is set up, though, things usually work smoothly.


I don't remember having to do much of that except picking what files I wanted (was a few folders in this case). It makes sense thought. You typically don't want to bundle what you don't need to, so making you set that config isn't the worst thing.


Author here, thank you for sharing. Will be happy to answer any questions.


The top comment in the thread says

> Free fbs doesn’t work with recent versions of python (>3.6)

Is this true? What are the plans (if any) to update the GPL version of the project?


May happen at some point in the future but no immediate plans.


that's not very reassuring....was excited but unfortunately, will be a no go from me.

if anybody knows an alternative to this, i would be very interested, i understand we all need to get paid but hmmm yeah open source is not easy to make money from since most people just expect everything for nothing, and this is just the reality of this space.


You won't find an alternative that is as good. And it's just a question of the value of your time. As a developer, you should recuperate the costs for Pro in less than an hour. And it saves you weeks that I have had to spend over years of development. I don't know how that calculation can't add up. But to each their own.


right im just worried if i pay to use this im locked to python 3.6

it would be perfect if you could solve this issue as this is what is blocking me from purchasing it.


If you pay to use it then you can use later Python versions. Pro supports at least up to 3.10 as of this writing and is continuously updated for later versions.


My biggest concern would be lock-in to the license, not lock-in to an old Python version. The nominal cost to get up-to-date right now doesn't guarantee me perpetual updates, right?

I'm also suspect of the misleading presentation on the landing page; nothing in the "Open Source" section says anything about the fact that the author has resolved to let the Open Source version effectively die, while up-selling existing users to the paid version. I respect the approach, and you deserve to be payed for the work, but it would be good to not effectively lie on the home page.


thanks for the clarification


Would you consider a refund policy or dry run trial with pro home?

The free version doesn’t support modern Python versions so to see if it works.


All but the cheapest edition come with a 31 day money back guarantee. It's written on the purchase page.


Congrats on the Tony Hoare prize, that's very impressive, Michael.


Thank you! Are you at Imperial?


I haven't used fbs, but fman is great. Thank you for your work.


Thank you for the kind words! I'm happy you like it.


Any plans for Appimage/flatpak build support for linux?


Haven't gotten around to it since 2018 and don't think this will change soon. Always happy to receive contributions though.

https://github.com/mherrmann/fbs/issues/49


And for those who would need Python and Qt "complexified" :

https://www.pyqtgraph.org/

> PyQtGraph is a pure-python graphics and GUI library built on PyQt / PySide and numpy. It is intended for use in mathematics / scientific / engineering applications. Despite being written entirely in python, the library is very fast due to its heavy leverage of NumPy for number crunching and Qt's GraphicsView framework for fast display. PyQtGraph is distributed under the MIT open-source license.

[...]

> Packaging for Distribution Applications written with pyqtgraph may be packaged as Windows exe files using py2exe or OSX dmg files using py2app.


This should not be this hard or expensive. Racket can do this out of the box. I’m sure there are better ways to do this in Python.


I used this project once and it was a huge distraction. It also ended up making us have to pin the whole project to python version 3.6 when 3.9 was out because it wasn’t sufficiently maintained itself.

It was much more sustainable and maintainable to just write our own build scripts for each platform with template tags and automate from there.


I'm a satisfied user of cx_Freeze in combination with Qt, but I only build Windows installers, so YMMV.


I used to use cx_freeze but started having problems with it which I can't remember offhand.

I switched to PyInstaller - see my comment at https://news.ycombinator.com/item?id=30820723


I have owned this sowftware for about a year and can say the author did a good job. It's worth it.

With that said, this may not necessarily be fault of the authors, but the tutorial and documentation really doesn't help. The Qt and PyQt/PySide ecosystem is so fragmented that understanding how to truly use fbs only came to me after months of browsing github for example code.

Something like a video tutorial series on YouTube that shows how to use Qt Creator with QWidgets with fbs would be great then another on how to use Qt Design Studio with QtQuick with fbs would be amazing.


> fbs's source code is available on GitHub. You can use it for free in open source projects licensed under the GPL.

> The free version of fbs has several limitations. Upgrade to Pro to unlock its full potential. Upon purchase, you'll receive a hosted package that you can install just like fbs. No messing around with license keys. Just pip install and you are done.

So it is more like open core. This is fine, just not clear from the front "features" page listing.


I'm getting annoyed at project saying that they are open source and then it turns out they are actually open core. I'm fine with dual licensing but not with false marketing.


Unless the core is not a product that can work by itself. I'd say it's still open source. Paid closed source extensions don't make it less open source.


They make it less open source than if the extensions were open source, or if the functionality was just part of the core system.


It's a historical artifact in this case. There was no commercial offering. But then I got requests for particular features and ongoing maintenance / support. This then became the additional parts you can buy.


If that is the case, then the word "limitations" is very misleading, almost dishonest marketing. It would be more honest if the regular offering was presented as a complete product, with optional commercial "extensions", whose documentation is separate.


It lies in the eye of the beholder what you consider a limitation. I invite you to look at the home page and compare what's available for free and what isn't and draw your conclusion then.


>It lies in the eye of the beholder what you consider a limitation. I invite you to look at the home page and compare what's available for free and what isn't and draw your conclusion then.

I tried to look, but you want me to evaluate your project by going through the manual and search for the "Pro" tag (as per your documentation [*]) while here you tell us "look at the home page".

Your project is great and your work is much appreciated,thank you for that. What I am seeking is clarity of the offering, because if I choose FBS for my floss project, I do not plan to pay 50€ for a hidden cost.

[*]

> Support for the latest versions of Python, PyQt6, PySide6 and PyInstaller.

> All features marked Pro in the Manual.


Dude the latest version of python that the free version supports is 3.6, which is out of support (including security patches). The free tier of your application is simply unusable.


Hey, I support your decisions, but I do think that finding the list of limitations is annoying. Scrolling through your manual looking for "Pro" markers is a little error prone I feel - maybe if you could surface the pro-ness of them into the table of contents of the manual at least?


> I'm fine with dual licensing but not with false marketing.

I love getting source code, but there are places where you really are looking for Free Software, not merely open source. Open core model products are really frustrating because maybe your use case isn't one where the value is high enough to be worth paying for "pro". I run into this often when someone asks about doing charity work. I do really like it though when an open core company is clear about it.


It's actually a bit worse than open core, in that the closed source version of the program works with versions of Python that have not been end-of-lifed [1] but the open source version of the program does not [2]. Because of that I'm not comfortable calling this open-anything.

This is a closed-source program that used to have a open-source version, which is now abandonware.

[1] https://devguide.python.org/devcycle/#end-of-life-branches

[2] https://build-system.fman.io/manual/#requirements


Open core is open source, just a layer on top of it. All the freedoms of FOSS are guaranteed for the software in the repo you are looking at.

The fact they make money by providing even more doesn't make it less open source.


This looks like a cool project, I had issues packaging Qt apps with Python for the Argos Translate GUI https://github.com/argosopentech/argos-translate-gui


I already have a Qt app I would like to package now (https://github.com/lrem/FastCull). Would fbs be something to look into, or should I investigate some alternative at this point?


I created a Windows installer of FastCull for you.

Screenshots:

Installer: https://imgur.com/a/2zQEwMS

Application (on the right): https://imgur.com/AYhholl

Download link for the installer:

https://fbs.sh/mherrmann/FastCull/FastCullSetup.exe

My code changes are in https://github.com/mherrmann/FastCull/. You need fbs Pro because you are using PySide6.


Thank you. Seems that's not for hobby projects like these then.


Weird that this project does not use Qt Installer Framework that already works cross-platform.


QIF didn't work for me. Updates weren't detected and it didn't have support for Windows registry. I also got the impression it's in maintenance mode and not widely used.


Sure, but this project probably predates the Qt Installer.


Can this be used to install a pygame game?

I've used Inno Setup for installing software on Windows before. It's free and works great. I've never tried installing python with it. But I did find a tutorial how to do it.

https://www.geeksforgeeks.org/convert-python-code-to-a-softw...


Anyone care to comment on 'Why Python'?

Javascript is quite commonly established as a good UI language these days, and I assume that anyone who can write Py can write Js.

Is there something particularly useful about Py, i.e. perhaps researchers who know Py may not want to bother to switch? Or that it integrates better with some things? Or that it's used widely at a company and investing in a second language is a big deal?


My guess is it’s because PyQt. AFAIK there’s not a JS binding (or any other language really) for Qt that’s nearly as established and steady. If you’re going with Qt, Python is the most reasonable choice (other than native C++ of course).


Historically it was a much more productive choice, than just about anything. Today it's merely an arguably more productive one. In any case it remains a good choice, and one of the most popular languages.

Despite years of FUD from the likes of Microsoft and others, "investing in a second language" is not a big deal at all and just short of required for projects of any complexity.


What libraries should I rely on to create cross-platform native (or native-approximating) UIs in JS?


A preference for developing in Python.


Do you know if there are free open source alternatives to fbs and qt?

I mean free both as beer and freedom.


If you install PySide/PySide2/PySide6, you don't need to install Qt as well.

Included with PySide[2|6] is QtDesigner, hidden in the distribution but available for use, and all the compiled Qt libraries.

The application created from that can be released closed source as using Qt under LGPL.

As for packaging;

Use PyInstaller, which creates a dist directory. Included in that dist directory will be everything needed to run your Python/Qt application.

Use Inno Setup/Inno Script Studio (https://jrsoftware.org/isinfo.php) to package that dist folder into an installer.

The end result will be a self contained installer which acts just like any other Windows software with an installer.

I use all the above to create and distribute Captain's Log (https://captainslog.scarygliders.net)


I am using kivy for a small project. Works pretty well for me.

https://kivy.org/


Qt is available as LGPL.


For the end user but for a commercial developer you have to pay I believe.


absolutely not, LGPL is LGPL no matter who you are. Such a restriction would make it incompatible with the LGPL (or even any free software license).


After reading their licensing that is now obvious. There is a group at my megacorp that ises it heavily from windows and they pay for tons of licenses. I'm not sure why. Unless they are static linking some of the gpl v3 modules and don't want to release code, I don't know why anyone would select the commercial qt license.


There's historically been a metric ton of FUD around this


The problem with QT is its license. All commercial applications I've seen are pre-v6 due to GPL license.


That doesn't make any sense, not much relevant about which modules are GPL has changed with the release of Qt6. Not that the licensing situation doesn't have problems, but that specific thing can't really be it.


My understanding was that there are significant changes between QT5 and QT6, at least that is the reason I was told by people that used it in our company. There was a warning to never upgrade to QT6. I am just going by the observation, could be wrong though.

Regardless, the licensing is a total nightmare, you can see it in Riverside's own forums: https://pyqt.riverbankcomputing.narkive.com/hqREGR1W/a-nasty...


Re Riverside forums: PyQt isn't Qt and isn't even the official Python bindings for Qt, but a third-party product. Only a small part of Qt is GPL, the vast majority is LGPL (always with commercial as the alternative). (Indeed, given that PyQt is GPL + commercial third-party, it seems to show that dual-licensing components that link to Qt is indeed possible)


Only if you're unwilling to be using GPL in the first place, which is clearly the desired effect. (If somewhat unfair for small companies, that have good reasons for not using a libre license and can't afford a multi-licensing expert.)


Reading articles like this is why you understand why webapps have unfortunately won


"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

https://news.ycombinator.com/newsguidelines.html


I'm not sure what particularly you mean about this article since it seems a lot easier than webdev to me. Javascript devops and Webpack in particular drive me up the wall. Qt is usually click-button-receive-EXE (when using an IDE, otherwise qmake is pretty painless) and this seems like the equivalent in just "fbs freeze"?


Not sure why you’re being downvoted - you have a point. I’m a web dev, and once tried dipping my toes into building a native GUI. I didn’t last long.


I was a native GUI developer who once tried dipping my toes into building web apps. I didn’t last long.


You aren't a native gui developer anymore. So I guess you made his point?


How did they prove their point? Isn't it completely possible that they left native GUI development for other reasons? Maybe they became a woodworker. Please post in good faith.


Humor is not HN community's selling point I guess.


Flutter is cross-platform, including the web. I'm working on an SDK that allows for back-end powered UIs that uses Flutter on the front-end: https://nexusdev.tools/


I get your point, but I wonder if the development being easier is a symptom of it being dominant rather than the cause. Web apps have a lot of other benefits that might have been the cause. I'm not a web dev, I mostly work embedded or HPC and my dev environment is either vscode or vim depending on my mood. I use plenty of cli native apps, but vscode and matlab are the only native GUIs I use. Is web development mostly done on web apps? Trying to develop in gitlab has always been painful to me for non trivial changes. It seems like anything that doesn't have huge files to move about like photo,audio or video editing could be a webapp.


This is really a symptom of the packaging scenario in Python, more than anything else. Web-apps have a lot of advantage in that regard, but desktop apps have their place, and I hold hopes that Python will come forward with better packaging tools in the long run.


I can package python apps fine, but creating a great UI with pyqt is much harder than with tailwind + vuejs, despite the fact I'm better at python than JS.


Not at all. A great UI fits in with the system it is deployed on, it is not a unique snowflake.


Yeah, do JavaScript programs even have good and easy ways to deal with multiple windows, keyboard shortcuts, and offline environments, considering their browser origins ?


Because there is no need to package/deploy web apps?




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: