Live data from Hacker News

Show HN: Cross-platform desktop applications with PyQT

github.com

61–70 of 293 posts

Re: Show HN: Cross-platform desktop applications with PyQT

#61
post #41

I have been developing in HTML/Python for a while now. This works wonderfully. You just need to put all your business logic in Python, use PyQt to run all the platform specific code like file dialogs, printing, etc. but keep the main interface with React. You do that by having a webview with a service object being the bridge between Python and the JS view[0]. If you are a bit careful with the amount of information go…

I’m curious, does that work with sandboxing on the Mac? One of the things that Mac file dialogs do is implicitly expand the sandbox for the process that opens the file dialog . Is the other side of the bridge still able to access the selected path?

I am sorry, I am developing mostly for boring big companies and my experience is only with Linux (because I develop with) and Windows (because my customers pay me to have the stuff available on it). Practically, this is just a PyQt application with a webview, so, it should work with PyInstaller.

Re: Show HN: Cross-platform desktop applications with PyQT

#62

It costs $500 for a commercial license for PyQT!!!!!!! That is super welcoming for people that want to run more than CLI in 2018! /s

You can develop commercial apps with PyQT, your code just needs to be compatible with the GPL3 license ( https://www.riverbankcomputing.com/commercial/pyqt ). PyQT is not different from any other dual-licensed open-source project in that sense.

It depends on how much time you will spend developing your app. I've been working on mine [1] for 2331 hours (I track my time). $500 is nothing in comparison.

[1]: https://fman.io

Re: Show HN: Cross-platform desktop applications with PyQT

#63

Earlier quoted context omitted.

> Except this sucks if, you know, you want to make some money on your app... Why is that a problem? You get a commercial license for PyQt and are good to go(?) > I love Python, but it has stagnated hard in the last few years. The 2 to 3 transition really hurt the Python ecosystem [...] I disagree. I think the ecosystem is more vibrant than ever. > Furthermore, packaging for different platforms is still a problem in 2…

$500 dollars... is "not expensive"? Beside the ML/AI sub-community, I am having a hard time finding GUI innovation in the Python ecosystem. Perhaps, you could show me an option that doesn't suck? I've tried Kivy, PyQt, PySide, Eel, gooey, etc... I am not a JS dev and had an electron/react app up and running that I easily ported to my Android phone in under an hour.

There’s toga (https://toga.readthedocs.org) which looks reallypromising.

Re: Show HN: Cross-platform desktop applications with PyQT

#64
I think that to compete with electron it would need to have something like React. It's very hard to go back to gui controls and the way they were done since before the web after you tasted something like React.

Killer innovation is not the markup language but components (extremely flexible and trivially composable at any level).

Re: Show HN: Cross-platform desktop applications with PyQT

#65
post #32

Earlier quoted context omitted.

What do you mean? I've uninstalled the Slack desktop app and just use the website because the app is such a terrible experience.

Wow. You realize they share most of the same code, and are essentially feature identical? Seriously, open the desktop app, then open the web app. They're identical. Precisely because they chose to use a toolkit that let them easily handle cross platform issues with UI in a sane and repeatable manner.

See, for a website, that's fine. But not for an application. Why would I not want an application that fits in well with my chosen OS, and follows the design guidelines and patterns of that OS?

Re: Show HN: Cross-platform desktop applications with PyQT

#66
post #55

I wish them the best of luck, but I don't think it's going to happen, because one of the big reasons Electron is popular is because web-dev people don't want to learn other languages.

It doesn't have to be an either-or. Some projects will be better built with Electron. Others with PyQt. They can coexist perfectly well.

Re: Show HN: Cross-platform desktop applications with PyQT

#67

> "PyQt is dual licensed on all supported platforms under the GNU GPL v3 and the Riverbank Commercial License. Unlike Qt, PyQt is not available under the LGPL. You can purchase the commercial version of PyQt here. More information about licensing can be found in the License FAQ." Except this sucks if, you know, you want to make some money on your app... Kicking the tires for a potentially commercial app is a FULL sto…

> Except this sucks if, you know, you want to make some money on your app... Why is that a problem? You get a commercial license for PyQt and are good to go(?) > I love Python, but it has stagnated hard in the last few years. The 2 to 3 transition really hurt the Python ecosystem [...] I disagree. I think the ecosystem is more vibrant than ever. > Furthermore, packaging for different platforms is still a problem in 2…

The licensing is a problem for an Electron competitor. I really wanted to use Python / Qt to make a desktop application I'd like to sale, but got confused by the licensing issues. I'll just use Electron. I hate that this is the case, but pretty screenshots and good marketing will be far more important than a fast startup time.

Re: Show HN: Cross-platform desktop applications with PyQT

#68

Earlier quoted context omitted.

I agree that HTML/CSS is easier to use, though maybe some of that is just because everybody has been using them for years. However, you certainly don't have to override ::paint() to get rich text inside a label. You can use a simple subset of HTML in your QLabel to get various text effects.

Please read in between lines... I could easy write any other example. Don't make me compare HTML/CSS's flexibility with Qt's...

You cited an example that is literally trivial in QT. The implication is that instead of comparing tools on their actual merits, and then forming qualitative conclusions, you already have an opinion you're trying to convince others of and are attempting to support it by making assertions about a tool you don't understand.

Re: Show HN: Cross-platform desktop applications with PyQT

#69

Earlier quoted context omitted.

I agree that HTML/CSS is easier to use, though maybe some of that is just because everybody has been using them for years. However, you certainly don't have to override ::paint() to get rich text inside a label. You can use a simple subset of HTML in your QLabel to get various text effects.

Please read in between lines... I could easy write any other example. Don't make me compare HTML/CSS's flexibility with Qt's...

No, please do. Explain to users why you need that, and why you feel you are important enough to bypass and ignore all of the existing design guidelines and patterns of whatever OS I'm running on. And why you feel you have to use up all of my CPU and memory to do so.

Re: Show HN: Cross-platform desktop applications with PyQT

#70

> "PyQt is dual licensed on all supported platforms under the GNU GPL v3 and the Riverbank Commercial License. Unlike Qt, PyQt is not available under the LGPL. You can purchase the commercial version of PyQt here. More information about licensing can be found in the License FAQ." Except this sucks if, you know, you want to make some money on your app... Kicking the tires for a potentially commercial app is a FULL sto…

If you don't want to pay for a commercial license, just use PySide. It's LGPL-licensed and has nearly exactly the same API as PyQT. So near that when I switched out PyQT with PySide, all I had to do was change two import statements throughout a ~3000 python gui application.
Post reply on HN