Live data from Hacker News

Show HN: Cross-platform desktop applications with PyQT

github.com

121–130 of 293 posts

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

#121
post #79

Earlier quoted context omitted.

"Bah humbug, the old stuff is good enough for me!" is a shitty answer. Why would you not want a toolkit that makes rich application experiences across multiple platforms easy and standard? I get that performance is a problem with the tooling in its current form (arguably...) but that's not a reason to ignore the problem electron is solving: creating complex UIs using things like WinForms, QT, GTK, Cocoa, etc SUCKS. I…

creating complex UIs using things like WinForms, QT, GTK, Cocoa, etc SUCKS I think that this depends on your background. Personally, I would rather do a UI in QT than Javascript. I like that Qt supports high level components such as trees: https://doc.qt.io/qt-5/qtwidgets-itemviews-simpletreemodel-example.html With Qt I can also use a lot of the experience that I gained 5 years ago on a UI today. Any Javascript UI ex…

> I would rather do a UI in QT than Javascript.

This has nothing to do with Javascript. It's much easier to do complicated UI using a web browser's layout engine than it is using one of the above frameworks. For really simple stuff, yes it's about the same, maybe even easier with native UI, but if you ever need to do something outside of buttons and lists, things will get ugly fast. On a browser on the other hand, you can very quickly implement any component you can think of using well-documented CSS rules.

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

#122
The longer i deal with computers the more brittle the Python ecosystem appears to be.

Yes it may be a wonderful language, but it seems so damned easy to get the interpreter to not find libraries that should by all accounts be right damn there in its search path.

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

#123
post #110

Serious question: Why do so many people think building desktop application GUIs with web-technologies is a good idea? I'm currently trying to formulate some thoughts on this; While I understand that HTML/CSS generally seems more flexible and may be more easily accessible to more/newer devs, it carries huge, negative implications in the forms of HCI (not having consistent interface elements on the user platform), perf…

It's easy to do.

That's it.

Why learn frameworks and UI paradigms for different platforms if you can just build it once? You can have a desktop app in under an hour if you already have a web app.

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

#124
post #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.

Yeah, except that it seems like PySide still doesn't support Qt 5.x according to [1]? While there is a page for PySide2 [2], I can't figure out if it's complete or not.

[1] http://wiki.qt.io/PySide [2] http://wiki.qt.io/PySide2

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

#125
post #110

Serious question: Why do so many people think building desktop application GUIs with web-technologies is a good idea? I'm currently trying to formulate some thoughts on this; While I understand that HTML/CSS generally seems more flexible and may be more easily accessible to more/newer devs, it carries huge, negative implications in the forms of HCI (not having consistent interface elements on the user platform), perf…

One codebase catchall. Most apps need some sort of web version and desktop version. So doing it all in web tech makes sense.

Then as you get familiar with web tech doing it in native toolkits requires you to learn new paradigms and quirks which is a barrier to creating new apps so people revert to what they know (web tech).

It's just that web is so popular so people stick to what they know. Same reason people would use say python with c extensions over golang. Even though go is faster out of the box, if they're used to the python ecosystem it makes sense for them to prototype in python and then optimize with c extensions, they can get something that works with less cognitive friction.

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

#126
post #110

Serious question: Why do so many people think building desktop application GUIs with web-technologies is a good idea? I'm currently trying to formulate some thoughts on this; While I understand that HTML/CSS generally seems more flexible and may be more easily accessible to more/newer devs, it carries huge, negative implications in the forms of HCI (not having consistent interface elements on the user platform), perf…

A few thoughts:

* Cost. Why hire a separate dev team for each of web, Windows, and MacOS (and in this scenario, you never get a Linux app) when you can hire a single dev team to work on the core of the app with maybe one person to handle platform issues (and you get a Linux app nearly for free, which you wouldn't otherwise bother with)? Hell, you might not even need to hire more people to deal with your desktop apps initially, if you have at least one web developer who is resourceful and can figure out the remaining details.

* Hiring. Web developers are everywhere and easy to hire. Finding someone with expertise in a particular GUI toolkit is harder. Even if you initially don't care about which particular GUI toolkit, after you start building in one, you need to find more people to hire who are familiar with it. (This is also another "cost" item, I guess.)

* Ignorance. My biases are probably showing here, but my impression of most frontend developers is that they don't worry about performance too much, at least not to the level that, say, a C++ or JVM or CLR developer would. They seem to view many performance issues as something to be solved by the Javascript engine or browser renderer. They also likely develop and test their app on a high end machine and don't notice perf issues until users complain.

* Marketing. Visit Electron's website, and then visit PyQt's (or Qt's, though they're a little better) or GTK's. I guess it shouldn't be a surprise that the websites made by people who work on web technologies look better and tend to have better marketing.

* Tooling. Web debugging tools have gotten pretty great during this decade, closing the gap with native-code IDE debuggers, gdb, valgrind, etc. Electron's tooling make it fairly easy to build for each platform. Building a cross-platform app in Qt or GTK requires native compilation for different platforms, which is still, even today, a bear to set up.

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

#128

Every time this argument comes up, I see the same tired comments, and they're typically from people that don't have to build a modern UI. There is an insane amount that you get for free in HTML/CSS/JS, and it's very clear why things like Qt & co don't stack up. Here's a small list (which could easily be a much bigger list) of things that are much easier in web dev land than their native counterparts. - Want to chart…

Here is an example of modern UI build with Qt:

https://www.youtube.com/watch?v=f7en65HkjeQ&t=39

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

#129

Earlier quoted context omitted.

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.

Are you seriously being difficult with someone who is suggesting that with HTML/JS, most of your work will already be done for you, even in the most niche cases?

Javascript is "libraries" the language, for better or worse. You're comparing a language which is the de-facto language of front-end design and increasingly popular on the back-end to UI toolkits that have been around forever and still have virtually no mindshare by comparison.

HTML and javascript are the time and energy wise choice for any sort of front end design. It's just that we have shit like electron that is beyond suboptimal at tackling the issue of "native" applications (although I'd argue still a sensible choice!). Ideally we have something like react-native for the desktop, or built in html/js runtimes with platform specific bindings.

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

#130

Earlier quoted context omitted.

what do i need installed to get started with this, i have your code but what do i do next?

Did you see the tutorial? https://github.com/mherrmann/fbs-tutorial

That's his point. With a web app, his experience tells him he can run the code within an environment that he's used to.

With PyQt, he needs to download and install PyQt. When ready to ship, he needs to figure out how to build it into an app that can be delivered to clients.

With web technologies, he knows how to get deliver code in ways it can be loaded in a web browser, and how he can deliver code to end users.

Though to use that web code with Electron, he needs to download and install electron and figure out how to build it into an app that can be delivered to clients.

Post reply on HN