Live data from Hacker News

Show HN: Cross-platform desktop applications with PyQT

github.com

261–270 of 293 posts

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

#261
post #108

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…

I'd argue the old stuff is better , not simply "good enough" vs. Electron etc. What have we gotten in exchange for the crap performance and extra RAM usage? Pretty animations? I don't need those; in fact they're distracting and annoying. You absolutely can make "pretty", complex UIs in native/cross-platform toolkits, and personally I find them much nicer to work with than the horror show that is HTML/JS/CSS. I get th…

I'm glad you understand one part of Electron adoption, but the other part is user experience.

Apart from being resource hogs Electron apps are usually delightful. And usability (for non programmers!) is what for a large part decides the value of your app. You want users to use your program, right? What they see is the UI. Making it easy to develop good UIs is important for a GUI tool (obviously!).

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

#262

Immediate mode graphical user interfaces have changed the way I look at GUI programming for the better. Here are my bindings to python for the nuklear framework. https://github.com/billsix/pyNuklear

Could you elaborate, or have a link handy?

No callbacks. No lifecycle diagrams. You don't give up control of the event loop. No memory management. You can add new widgets by copying/ pasting/modifying from demos easily.

Lisp is interesting in that unevaluated code is a data structure of the language. In immediate mode GUIs, the sequence of function calls is your data structure.

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

#263
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…

Indeed, Qt is a great basis for developing a modern application with a HTML frontend. This is because Qt bundles a modern browser engine (was WebKit, nowadays Chrome) and has JavaScript support at various places (https://doc.qt.io/qt-5.10/topics-scripting.html).

All this makes Qt a first citizen in the Rich user interface world where the players have names like Vue, React and Angular today.

Btw, don't forget we had desktop toolkits with rich user interfaces already in the 2000s. In that time, Java was the big player. Swing was already superseded by Eclipse's SWT and HTML panels were already ubiquitous.

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

#264

Earlier quoted context omitted.

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

That's funny, I've never heard anyone pronounce it 'cute'. (anecdotal, maybe ~20 developers so far)

True, and I was pedantic to reply.

Last week someone else on hn did the same; and I kept quite.

Unfortunately this time I could not stop the graybeard in me.

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

#265
post #108

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…

I'd argue the old stuff is better , not simply "good enough" vs. Electron etc. What have we gotten in exchange for the crap performance and extra RAM usage? Pretty animations? I don't need those; in fact they're distracting and annoying. You absolutely can make "pretty", complex UIs in native/cross-platform toolkits, and personally I find them much nicer to work with than the horror show that is HTML/JS/CSS. I get th…

> Pretty animations? I don't need those; in fact they're distracting and annoying.

Animations are an important tool for showing transitions between states.

Pasquale D'Silva has a bunch of good blog posts explaining how they can help an interface:

- https://medium.com/@pasql/transitional-interfaces-926eb80d64...

- https://medium.com/elepath-exports/spatial-interfaces-886bcc...

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

#266
post #4

The main problem with "other toolkits" vs Electron apps is that they are not as simple to use in order to create a very good looking UIs. Compare how easy it is to use HTML and CSS in order to create a very complex UIs with all sort of effects vs how utterly complicated is to override, let's say, Qt's ::paint() method in order to achieve rich text inside a label. Let me repeat it. Rich text inside a label. Such a sim…

> The main problem with "other toolkits" vs Electron apps is that they are not as simple to use in order to create a very good looking UIs. What Electron apps are good examples of ones that look very good? Slack and VS Code both look fairly bland, and Spotify is a bit of an over-energetic mess, at the moment.

Discord and Insomnia are two I use regularly. Also, IMO, VS Code is the best-looking IDE/text editor I've used.

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

#267
While this looks promising on paper for Python user , it will probably just die in the coming years due to a lack of vision and of community.

Electron is backed up by Github , we are talking about a billion dollar unicorn , and a lot of commits made are coming from outside github ( microsoft engineers for instance)

For this ? I doubt it would go beyond 1 year of surviving .

Also I've been using VS Code for years ,it's incredibly well optimized and doesn't have a problem in terms of memory or CPU .I personally found electron very reliable , it has surprised me on this point.

Ultimately this tech feels a lot like all the 'I hate javascript so here is my alternative' frameworks we had for the past year.

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

#268
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…

Forgive my naivete, this is a python application that interfaces with the user through QT. You still had to build a react front-end separately though?

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

#269
post #250

Earlier quoted context omitted.

Its 15 years older.

If I'm going to use a GUI toolkit, the last thing I want to hear is "it hasn't been updated/hasn't had a revamp in 15 years". I know it's just the site, but it doesn't inspire confidence.

A lot of the wind went to the web resulting in a lot of churn there. Think of this as the LTS. Or, in other words, if it ain’t broke, don’t fix it.

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

#270

Earlier quoted context omitted.

Neither are as good as 99% of the tools available for development with HTML/CSS. Plus, with HTML/CSS, you can work manually on your project, without any special tool besides your browser, and see the effects you have on the layout in real time. Delphi/Qt Designer look way worse than any HTML/CSS/JS GUI builder, too - along with having interfaces equivalent to what GIMP's is to Photoshop.

Neither are as good as 99% of the tools available for development with HTML/CSS. [...] Delphi/Qt Designer look way worse than any HTML/CSS/JS GUI builder, too - along with having interfaces equivalent to what GIMP's is to Photoshop. I have a feeling that you do not have any actual experience with Qt Designer or RAD tools? Designing a user interface quickly is many times easier in Qt, Delphi, etc. than in HTML/CSS. It…

I have a feeling that you do not have any actual experience with Qt Designer or RAD tools? Designing a user interface quickly is many times easier in Qt, Delphi, etc. than in HTML/CSS. It start with the basic fact that Qt has many useful widgets that are not available in plain HTML, nor many CSS/Javascript frameworks. From there it is just drag and drop, adding a few spacers here and there and you are done.

I have a fair bit, albeit less than the average user of said programs, of experience with Qt Designer and, admittedly to a lesser extent, Delphi. They're infinitely more complicated than, say, Adobe Muse. Muse has plenty of widgets, too; even if it's not 1:1 on pure quantity. BlueGriffon is quite nice, too.

Why would I develop in such an arcane manner if I already have great development tools for more than two decades?

Modern web browsers* have more or less functional IDEs within their devtools.

*Except Firefox, of which has devtools half a mile behind most other browsers, at least in my opinion.

Of course, I'm speaking from the point of view of someone who's a much worse programmer than designer.

Post reply on HN