Live data from Hacker News

Hello Qt for Python

blog.qt.io

151–160 of 176 posts

Re: Hello Qt for Python

#151

This is like 10 years too late. This could have prevented electron.

People use Electron because of web technology and also the abstractions available there like React, not because any dynamically-typed language would've sufficed.

In fact, Python is at a disadvantage here anyways because it's not async by default.

Re: Hello Qt for Python

#152
post #51
post #44

Earlier quoted context omitted.

I just took a look at delphi. What’s so unique about its ui builder?

It was (is?) very powerful and at the same time very easy to use. Not sure about alternatives nowadays...

For .NET, Eto is a good option. It's cross-platform and supports the native toolkits of the platforms it supports:

https://github.com/picoe/Eto

There's also Avalonia, but it's currently in beta:

http://avaloniaui.net/

Re: Hello Qt for Python

#153

Earlier quoted context omitted.

conda install pyqt

Why was this downvoted? It will setup exactly what was asked for. Specifically qt 5.9.5 with PyQt.

>>> You can just do `pip install PyQt5` now.

>> How well does that work on OSX?

> conda install pyqt

Your comment, while presenting a potential solution to the original problem, did not make sense in context and went off in another direction entirely.

Re: Hello Qt for Python

#154

This is like 10 years too late. This could have prevented electron.

People use Electron because of web technology and also the abstractions available there like React, not because any dynamically-typed language would've sufficed. In fact, Python is at a disadvantage here anyways because it's not async by default.

What's so important about being async by default to build desktop applications? Offloading slow tasks to a background thread is not at all harder and actually allows you to use more than one cpu core.

Threads avoid the need of callbacks/promises/async/await and they're also cheap and performant unless you need to spawn >10k of them, which seems very unlikely in a desktop applications.

Being async by default is an advantage when you need to handle hundreds of thousands of tasks, all of which are mostly waiting on I/O, which is something that can happen on server side applications, and almost never on the desktop.

Re: Hello Qt for Python

#155
post #105

Earlier quoted context omitted.

Not OP, I've been very impressed with some enlightenment apps written using python. In particular: https://github.com/DaveMDS/egitu https://phab.enlightenment.org/w/projects/python_bindings_fo... Scroll down to "python projects using EFL".

I wouldn't use enlightenment/EFL for a new project today. If you've got the opportunity to greenfield, Qt is a much nicer framework. EFL has a number of questionable design choices, covered a little bit here: https://what.thedailywtf.com/topic/15001/enlightened .

I feel so grateful that my first GUI toolkit is Cocoa touch which is mature in design. At least the typing just works and object ownership is well defined.

Re: Hello Qt for Python

#156
Why though? Is there some useful benefit that python offers over C++, or is it just another language support so that people more comfortable with Python could use it?

If I were ever to write a desktop app, which one should I choose, given I'm equally comfortable with both languages?

Re: Hello Qt for Python

#157
post #50

Earlier quoted context omitted.

This just means that wrapper around C(++) code doesn't handle resources correctly. As you said, once inside Python you shouldn't care about object collection process. Nothing should lead to segfaults, in worst case you should get an exception about missing parent ref.

more exactly “underlying C/C++ object has been deleted" error.

In my experience, those errors are easy to resolve: just assign the new object to something, so it isn't immediately deleted. A little awkward, maybe, and it shouldn't happen, but if that's the worst quirk of PyQT/PySide, I can deal.

Re: Hello Qt for Python

#158

Why though? Is there some useful benefit that python offers over C++, or is it just another language support so that people more comfortable with Python could use it? If I were ever to write a desktop app, which one should I choose, given I'm equally comfortable with both languages?

It's like you say, and like the qt blog says, "opening to python world"

About your second question (c++ vs python), even I am curious

Re: Hello Qt for Python

#159
post #114

Earlier quoted context omitted.

Tkinter, it comes packed with python and is actually really good and really fast. In fact, when I tried variations of Qt for py, I just quit out of frustration with how things either didn’t work or didn’t work very fast, now I just stick with Tkinter.

Do you know of good tutorials on ttk? I keep on reading that the look and feel provided by ttk is much more native than tk, but I can hardly find a good relevant tutorial.

Check out tkdocs.com

Re: Hello Qt for Python

#160
post #67

I have been waiting for this my entire adult life. That's all I have to say about it.

What about pygobject? What does Qt have to offer over GTK?

Haven't used either, but people typically say that Qt's API is cleaner, that it's better suited for cross-platform applications (for example it has support for Android) and that it's more flexible (for example LXDE is being rewritten as LXQt, since the devs found GTK3 too heavyweight and too GNOME-centric).
Post reply on HN