173 points · by fellerts · 3y ago · 90 comments
[1] https://play.google.com/store/apps/details?id=com.kebstudios...
> No; incorporating or linking against GPL requires that your project-as-a-whole be distributed under GPL. But you can include MIT licensed parts (or another GPL-compatible license) in the project. Also, it depends.
As the quoted part says: the project as a whole (which includes the library itself) need to be GPL, but part of it can be MIT. So the code of the program on GitHub can be MIT.
That said, does it even count since he's not distributing it (Qt) at all?
Its the whole reason PySide exists, to have a Qt Python library hat is LGPL to allow works that use it not have to be GPL like PyQt does.
This is from when Qt still cared about LGPL, i.e. the Nokia days when the aim was to be the commercial-friendly Nokia SDK.
… but most importantly it can calculate with units and show the result converted to your liking e.g. you can write
10 Nm×2pi×20/minute to W and Qalculate will show the result as 209,4395102 W. When you get used to that, you don't want to use any calculator that doesn't have that feature any more.
e.g.
> 100 GB/minute to kB/s
I guess the reason I chose Qt over any web-based frameworks is I wanted a standalone app that would launch in a fraction of a second and just do its job. I don't think a webapp (if that's what they're called) would give me that. At the time, it seemed that Qt would work well and, as a bonus, be cross-platform. I had some Python experience to boot which helped.
Edit: I do have a personal site at https://www.fellerts.no/ but it's entirely static, no real js to speak of.
It's just that the Qt company always tries to make it non-clear that Qt is not open source to drive their sales.
Regarding bloat, Qt is quite modular and if you want just the widgets you only need QtBase and none of the additional modules.
I think instead of "truly reusable" I should have said something like "requires minimal configuration." I think Python's reflection capabilities allow one to supply less boilerplate when writing PyQt apps. This is just a subjective impression that I have, and unfortunately I am having trouble elaborating on this in a way that I think would be effective. That is why I asked the author what they thought, since I am wondering if anyone else has had this impression. However, I will think about this more, and I might provide more examples if I can think of them.
[1] https://pyapp-kit.github.io/superqt/widgets/qenumcombobox/
Neither JS nor Python really have types at runtime or any other time, but you can approximate them with Objects and/or Classes (of course, I repeat myself ;) ). With some TS magic you can even get the `setEnumClass` call to be well typed, though if I were building it from scratch I'd make the EnumClass prop immutable, too many weird corner cases otherwise.
I've never worked extensively with Qt myself, but when helping out a friend making Maya plugins in Qt we'd occasionally hit SEGFAULTS from writing seemingly mundane Python that'd crash all of Maya. That was enough to turn me off of it, but looking through the docs you linked there are some compelling components. It's nice to have a component library separated from a specific framework (in the React/VUE/etc. sense)... I don't know of any in JS. Every framework seems to think their (incompatibile with everything else) approach to reactivity is the hold grail, and being modular across it would be impossible.
Though reconsidering, I suppose Qt is sorta the same... it's just another framework and their "signals" aren't Python. Ah well.
Diving deeper, signals are weird... they aren't even really part of the underlying C++! Some sort of strange new modifier Qt invented at the level of `private`/`public`/`protected` and such. https://doc.qt.io/qt-6/signalsandslots.html
https://docs.huihoo.com/qt/solutions/4/qtcopydialog/qtcopydi...
Is the result by any means passing through a double? like in freakin' JS!
It includes a C interpreter and is very handy when manipulating registers.
Unfortunately not open-source.
Unfortunately with macOS's "Dark Mode" enabled the colors have little or no contrast. And the UI renders very small for my eyes (and compared to the demo gif). This is a criticism of Qt (or maybe its python bindings) rather than this project. (Screenshot: https://imgur.com/a/G9eAPoO)
I wonder if there's a way to shimmy in a "modern macOS Qt renderer" or something into an existing project like this without a rewrite?
Apparently there is. I hacked something together in a new branch: https://github.com/fellerts/procal/tree/fredrik/theme. Feel free to check it out and let me know how it works for you.
QFont('Monaco', 12)
in order to make it look nice.Edit: merged a fix for this, thanks for reporting.
You could play with the QT_SCALE_FACTOR environment variable to fix the scaling issue at least. Something like this could work:
$ QT_SCALE_FACTOR=2 python procal.py
As for the colors, that's probably something this tool should handle. I'll take a look to see if this is an easy fix.My daily calculator is `jupyter qtconsole` (formerly `ipython qtconsole`). I've had it binded to Meta+Q forever and it is very handy to have a full Python REPL which can occasionally display graphs and stuff that can pop up at hand.
If it were executing third party input on your machine, then it’s a completely different ball game.
E.g. if you want to compute the width of some object in Inkscape or Freecad, using some formula not supported by those programs.
How is the developer experience for that? Anyone able to contrast with Tkinter?
This can be remedied to a degree: https://doc.qt.io/qtforpython/considerations.html#features