Live data from Hacker News

PyQt5 Tutorial: Create a Python GUI in 2018

build-system.fman.io

81–90 of 211 posts

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#81
post #32

Earlier quoted context omitted.

I was recently surprised by how non-ugly a Python Tkinter app can look with some effort. Take a look at this: https://thonny.org/

that's an interesting definition of "non-ugly". I would hesitate a lot before making an app that looks like this screenshot public.

What's wrong with it?

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#82
post #29

I gave up on QT and decided instead to invest time learning javascript frameworks, which provide a lot more flexibility for creating apps.

Flexibility to do what, though? I'm genuinely curious: what doesn't Qt offer that a desktop app might need?

Why do you think programmers of all people are heavily migrating to Electron based editors like VS Code? Because they like using slow and bloated apps? And I'm not talking only of web programmers, I know plenty of C++ programmers who moved to VS Code.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#83

Earlier quoted context omitted.

All of our end users are internal, so the main bloat-related problems wouldn't really be an issue at all. Why should we be worried about electron in the future?

Electron is notorious for disregarding all platform conventions, being slow, and being a memory hog.

[deleted]

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#84

We use Qt heavily at Starsky Robotics. We initially used it because it has tight integration with ROS via RQT [1], but I'm pretty impressed with the framework in general. Lots of great tools out of the box, QtCreator is awesome and once you get the right signal/slot model in your head everything is a breeze. Plus getting to prototyping in python is always fast! For our use case, relative speed of the GUI isn't a fact…

What's the memory consumption of pyQT compared to electron apps?

I don't know off hand, and we never compared w/ Electron, it was just floated as an idea. When we eventually fully refactor our GUI code to be agnostic of ROS we'll profile more completely.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#85
I'm sometimes considering porting the UI of a relatively complex management app I wrote sometime ago for a small company, from Ext JS to a Python-flavored traditional GUI framework like PyQt (it would essentially become a desktop app powered by an already Python-based backend, which wouldn't be really a problem deployment-wise, as it's an internal-facing app). I think there would be some benefits, but what stops me is a relatively concrete consideration: the primary UI widget on which my app relies are complex data grids, which must support a lot of functionalities (sorting, filtering, etc; which is an area where Ext JS clearly shines), and I'm wondering which framework would offer the best support (in terms of both functionalities and abstractions) for this kind of needs. Any ideas about this?

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#86

In commercial settings, I wonder how hard it really is to package this up? I've been building/distributing fully cython'd installers for a while (to sort-of hide the source as well as make a convenient package)... I wonder if that would be harder with PyQt for some reason? "In the Python world, the process of turning source code into a self-contained executable is called freezing. Although there are many libraries th…

I can't speak for fbs (never used it), but the way these things usually work (pyinstaller et al) is by compiling everything to .pyc or .pyd and/or pack it up with the python runtime in an executable. It's probably not too hard to extract the original source, but it would be enough to deter a casual observer.

The problems with packaging PyQt usually boil down to module discovery, because the import machinery is leveraged by the wrapper in nontrivial ways. PyInstaller has been ok for me recently, whereas cx_freeze was unpredictable across minor versions.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#87

Earlier quoted context omitted.

All of our end users are internal, so the main bloat-related problems wouldn't really be an issue at all. Why should we be worried about electron in the future?

The worry is that you have too many developers who don't consider HTML/CSS/JS a proper stack for a "real" engineer and there refuses to learn it.

> even though the development time is obviously shorter with electron

Evidence? I think you're making a great point (about the reputation of html/css/js) but leave the unfounded claims out and your point would be stronger.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#88
post #41
post #7

As someone who works with Windows forms, I'm wondering where the visual designer to place widgets is.

If you use the complete Qt installer, you get QtDesigner. If you use the PyQT-provided wheels and/or you don'want to mess with the whole Qt, then you can separately install QtCreator, which is very simple and embeds QtDesigner.

Looking at a tutorial, it looks like all it does is layout the form for you. That's a shame. Things closer to what the original VB was are sorely missed in modern computing.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#89

Earlier quoted context omitted.

All of our end users are internal, so the main bloat-related problems wouldn't really be an issue at all. Why should we be worried about electron in the future?

The worry is that you have too many developers who don't consider HTML/CSS/JS a proper stack for a "real" engineer and there refuses to learn it.

Obviously shorter to people who have done HTML/CSS/JS for some time, same with Qt/C++ or Qt/Python.

Re: PyQt5 Tutorial: Create a Python GUI in 2018

#90
post #85

I'm sometimes considering porting the UI of a relatively complex management app I wrote sometime ago for a small company, from Ext JS to a Python-flavored traditional GUI framework like PyQt (it would essentially become a desktop app powered by an already Python-based backend, which wouldn't be really a problem deployment-wise, as it's an internal-facing app). I think there would be some benefits, but what stops me i…

You can do all those (sorting, filtering, etc) in Qt as well using the Model/View components. There is a bit of a learning curve to understand the "Qt way of doing MVC", but after that it works fine.

At work we use Qt5 with both C++ and Python (through PyQt) and I love it.

Post reply on HN