I would also wonder about performance scaling. Are there good examples of "large" applications where CPython drives the main loop, as opposed to a scripting layer over a C++ core? CPython has a shallower optimization floor than Javascript+V8, and most larger Python GUI applications I've tried had noticeable lags (thinking of several visualization apps, and several Python-centric IDEs). I was similarly skeptical of Javascript-based desktop applications until recently, but Visual Studio Code has been very impressive.
Show HN: Cross-platform desktop applications with PyQT
131–140 of 293 posts
Re: Show HN: Cross-platform desktop applications with PyQT
#132Earlier quoted context omitted.
I would disagree with this as I've created many small apps using QT, and getting started is much easier than with Electron (in my opinion). It is as easy as this: import sys from PyQt5.QtWidgets import QApplication, QWidget if __name__ == '__main__': app = QApplication(sys.argv) w = QWidget() w.setWindowTitle('Hello, world!') w.show() Also, styling apps in QT is really easy, in fact you can even use CSS: http://doc.q…
At least in nw.js which is a similar toolkit to Electron: { "name": "helloworld", "main": "index.html" } And index.html is just whatever HTML web page you want, like " Hello World Hello World ". You could also use a javascript file as your "main" file if you want. Even when you screw up the HTML it will still load, which won't happen if you get your underscores wrong in your example. Edit: removed erroneous formattin…
And this is why we have the wasteland of browser incompatibility that we're (still!) in. If something is wrong, it shoudn't work. Why are our standards so low that mistyping "head" as "herd" is considered something that heuristics should fix, rather than causing an error?
I mean, really, though, any decent IDE should flag that error for you in-line, anyway.
Re: Show HN: Cross-platform desktop applications with PyQT
#133> "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.
Re: Show HN: Cross-platform desktop applications with PyQT
#134Earlier quoted context omitted.
Not that most companies would care, as dev cost seems to be all that matters these days, but the upsides are much faster and leaner applications than what you get from Electron.
Can't talk as to rendering and such, but python isn't going to be a performance win vs JS. V8 is faster than cpython by a decent margin for typical tasks on typical data structures. You'll need to dip into clang or whatnot for really hardcore perf either way
Re: Show HN: Cross-platform desktop applications with PyQT
#135Serious 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…
We've got enough RAM & CPU cycles spare that we can run GUIs in a headless browser and CSS & JS have come along far enough to make this easy(ish) to pull off, especially when combined with a framework such as React or Angular.
I can see why it's done, from the cost PoV, but I'm always a little dismayed when I find yet another desktop app which has the 'uncanny valley' of an almost-native look and feel. Same goes for ReactNative vs true native mobile apps.
Re: Show HN: Cross-platform desktop applications with PyQT
#136Serious 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…
The market shapes the tech that's developed and companies shape the market.
It's a self-reinforcing vicious cycle of hype-driven demand.
Disclosure: I'm a web dev :(.
Re: Show HN: Cross-platform desktop applications with PyQT
#137Serious 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…
Because system resources are cheaper than expert knowledge. We've got enough RAM & CPU cycles spare that we can run GUIs in a headless browser and CSS & JS have come along far enough to make this easy(ish) to pull off, especially when combined with a framework such as React or Angular. I can see why it's done, from the cost PoV, but I'm always a little dismayed when I find yet another desktop app which has the 'uncan…
Re: Show HN: Cross-platform desktop applications with PyQT
#138Serious 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…
Because system resources are cheaper than expert knowledge. We've got enough RAM & CPU cycles spare that we can run GUIs in a headless browser and CSS & JS have come along far enough to make this easy(ish) to pull off, especially when combined with a framework such as React or Angular. I can see why it's done, from the cost PoV, but I'm always a little dismayed when I find yet another desktop app which has the 'uncan…
This means not only implicitly making a choice about the users' hardware, but it may in some cases exclude certain user segments as well.
Re: Show HN: Cross-platform desktop applications with PyQT
#139Re: Show HN: Cross-platform desktop applications with PyQT
#140Serious 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 appeals to people who regard desktop resources (memory, CPU cycles, etc.) as functionally unlimited. Thus, there's no reason to worry about low-level efficiency, such as with C or C++. So why not use all the technologies you already know and use everywhere else, like JavaScript? I don't know if I agree that it's the best tool for the job, but I can see the appeal to someone whose world is JS and Python only. Espec…
Webdev is not the best tool for the job but it's cheaper and substitutes for a sleeve of other specialised tools.
The user experience is secondary if you do a product on a budget and iterate over it all the time. Especially if you are a web-first experience like Slack. Having native stuff there would make it even worse adding cognitive dissonance to the overall design.
I guess there's a method in this madness.