News for hackers. Stuff that matters.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by toyg on Tuesday September 25, 2018 @01:15PM (#18068293)
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.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by AnIdiotOnTheNet on Tuesday September 25, 2018 @02:09PM (#18068905)
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 by ajuc on Tuesday September 25, 2018 @03:26PM (#18069637)
It gives you ui for connecting signals and slots and configuring stuff as well, but few people use it. And qt singals and slots model is far superior to VB/Delphi style callbacks or c# delegates, but you have to program for a while to get why.

Also - layouts in VB/Delphi weren't responsive, layouts made in QtDesigner are.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by module0000 on Tuesday September 25, 2018 @04:44PM (#18070316)
Ahh...responsive layouts in VB, those were the days. Cramming everything into a frame, and looping through each widget to set width to 49% of the frame.....every time they moved/resized the form. It seems a lot more pleasant in my memory that it likely was at the time.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by ajuc on Tuesday September 25, 2018 @04:55PM (#18070399)
I have some comparison, because I worked with Oracle Forms and qt3 at the same time in my first job. Forms weren't VB, but the principle was the same - everything was set manually.

Once customer bought new monitors and we had to "upgrade" all forms from 800x600 to 1024x768. Took us 3 months. Qt forms worked fine out of the box.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by toyg on Tuesday September 25, 2018 @03:49PM (#18069880)
> ui for connecting signals and slots and configuring stuff as well, but few people use it.

I try hard to do that (it saves on boilerplate), but the challenge is always in finding signals and slots with the same precise amount of parameters. Say I trigger a signal with no parameters and I want to connect it to a slot that takes a boolean always with the same value (e.g. a pressed() connected to a setEnabled(bool), where bool should always be True), I can't do that in Designer, it has to be in actual code - a trivial one-liner, sure, but still one more line of technical debt.

(INB4 "ur doing it wrong": yes, I know about clicked(bool), toggled(bool) etc, it was just an example to explain the concept.)

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by ajuc on Tuesday September 25, 2018 @04:11PM (#18070069)
I don't consider connecting signals in xml (via designer) better than connecting them in code. The line is still there, just in different place.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by toyg on Tuesday September 25, 2018 @05:34PM (#18070690)
But the UI changes very rarely, and it’s out of the way most of the time; whereas the class method is always in the way in parts of code that could see a lot of day-to-day activity, migrations (py3...) and so on.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by ajuc on Tuesday September 25, 2018 @05:48PM (#18070798)
On the other hand refactoring is much easier if all your signals are connected in code.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by meredydd on Tuesday September 25, 2018 @03:16PM (#18069517)
If you want VB/Delphi-style app builder for Python, can I interest you in Anvil (https://anvil.works)? It targets the web, but you write all the code (even client-side) in Python. We've had multiple customers describe it as a worthy heir to Delphi :)
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by AnIdiotOnTheNet on Tuesday September 25, 2018 @08:39PM (#18071730)
> It targets the web

Thank you, but no. It doesn't fit the philosophy of the system I'd want to include it in.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by rkeene2 on Tuesday September 25, 2018 @02:37PM (#18069158)
Here you go: vTcl -- just like Visual Basic 3.0.

Also, you get to use Tcl instead of Visual Basic, so even better !

http://vtcl.sourceforge.net/

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by pjmlp on Wednesday September 26, 2018 @03:43AM (#18073644)
Visual Basic 6 compiled to actual native code though, while TCL teached me to never use such languages beyond bare scripting tasks.

Even Visual Basic 3's P-Code interpreter was faster than TCL string based one.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by meredydd on Wednesday September 26, 2018 @05:24AM (#18074216)
What was the last version of TCL you used? These days they have an extremely cunning system involving multiple representations: Being TCL, every value is of course canonically a string, but if you do (eg) integer operations the result will be stored only as an integer until its needed as anything else. And the body of a 'proc' will be compiled to bytecode on first use, so subsequent calls will go much faster. One could even add a specialising JIT to this if you wanted to.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by pjmlp on Wednesday September 26, 2018 @05:28AM (#18074238)
Version 8.x, the ones where bytecodes where introduced (1999 - 2003).

Thing is, if you want to speak about modern TCL implementations, then the comparison needs to be against VB.NET, with its 64 bit SIMD aware JIT/AOT compilers.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by rkeene2 on Wednesday September 26, 2018 @11:24AM (#18076884)
Also, modern Tcl can be compiled to machine code to a large degree thanks to TclQuadCode and LLVM.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by pjmlp on Wednesday September 26, 2018 @01:04PM (#18077996)
Interesting I wasn't aware of it, how mature is it?
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by rkeene2 on Thursday September 27, 2018 @12:20AM (#18082092)
It is still experimental, but the output code is stable -- most of the work is in expanding its support for the Tcl language.