Live data from Hacker News

Show HN: Cross-platform desktop applications with PyQT

github.com

41–50 of 293 posts

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

#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 going through the bridge, you get very good performance (the page[0] is linking to some small screencasts/videos).

With this approach, I have the best of both worlds for my small shop where development time is constrained. The really good part is that I can reuse for the desktop application work done for the website both the front-end and the backend which is written in Python for all the scientific code.

[0]: https://www.ceondo.com/ecte/2016/04/chemeo-studio-explore/

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

#42
post #32

Earlier quoted context omitted.

It’s the difference between HipChat and Slack. Like it or not, the users do.

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.

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

#43

> "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 2018.

That is exactly what this project is trying to help with.

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

#44
post #17

Earlier quoted context omitted.

How is this an issue? Before Electron and other HTML/CSS-based "native" apps became all the rage (which is fairly recently), native apps were built using Qt, GTK, Cocoa, WPF, WinForms, MFC, etc., and they did just fine. Perhaps we just really don't need these "effects" and just need consistent, simple UIs of the sort that toolkits that paint native widgets can give you. Whenever I install an app that's built using so…

"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…

> Why would you not want a toolkit that makes rich application experiences across multiple platforms easy and standard?

Because way more often than not the "rich" stuff are all fluff with no meat, end up taking wasting system resources and work badly with the rest of the system.

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

#46
post #19

Earlier quoted context omitted.

If you really need the full flexibility of HTML/CSS, you can just use QtWebKit and embed a webview in your UI.

Or just use Electron/React-native and skip the pain involved with licensing, packaging, and lack of mobile support.

That's crazy! /s

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

#47
post #10

Earlier quoted context omitted.

Are you aware of QML, which is part of the Qt framework? https://en.m.wikipedia.org/wiki/QML

Yes. QML is a step in the right direction, but the syntax is kind of awkward, and you still need C++ on the background, which makes it harder to use, more expensive (in terms of man/hours cost) and slower to develop than + HTML/CSS.

> "you still need C++ on the background"

There are ways around that. For example, DOtherSide is a C library to bind to QML, and binary releases for Windows and Linux are made available on the GitHub page, so in principal you could try out QML without needing to directly use a C/C++ compiler:

https://github.com/filcuc/DOtherSide

There are also a few other languages with QML bindings, such as Rust (the Rust binding is based on DOtherSide):

https://www.vandenoever.info/blog/2017/02/17/a-simple-rust-g...

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

#48

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.

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

#49
post #6

QT is amazing, it has been around so long and there even is a photoshop to qml exporter [1] that helped us make this dashboard for my Universitys formula hybrid team in [2] [3]. It really did not take too long and the performance is amazing on the Pi. I highly recommend QT, and there are amazing bindings for languages. I am looking forward to trying this out! [1] https://github.com/qt-labs/photoshop-qmlexporter [2] h…

Qt, the application framework from Qt Software is written as Qt (capital Q). It is not written as QT (capital Q, capital T). QT can refer to a lot of other things, e.g. Apple QuickTime.

The official pronunciation of Qt is “cute”. It is not pronounced as “cue tea”.

[0]: https://ariya.io/2009/01/qt-not-qt

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

#50
post #29

Earlier quoted context omitted.

Maybe you don't want a good looking UI, but it's safe to say that at least 90% of users want a good looking UI. Good looking UI is a major part of user experience.

Not saying I don't believe you, but do you have a source for that 90% claim?

The history of fashion and marketing tell us that appearance matters.

It drives engineers batty, because it's often irrational.

Just because something is irrational doesn't mean it doesn't have a huge impact on something like adoption.

If we didn't care how things looked, we might all be wearing google glass.

Post reply on HN