3 ms·
Just last week I had a requirement where a user at our company needs to run some commands on an embedded system to configure it before it is sent out to custome
by wernsey 4y ago
Just last week I had a requirement where a user at our company needs to run some commands on an embedded system to configure it before it is sent out to customers.
20 years ago I would've opened up VB6 and knocked out a quick GUI for that kind of work, but I never got on to the VB.NET train.
So I spent some time that evening looking at modern VB6 alternatives, but nothing satisfied me: Lazarus might be something I'd look to in the future, but I'm not too keen on Pascal, Gambas is not really suitable for Windows, then there is this and RADBasic that are incomplete.
In the end, I found a nice Tkinter tutorial [1] and managed to get the GUI I envisioned up in an hour.
I've played with Tkinter many years ago, but I basically had to learn from scratch. The speed at which I was able to get up and running led me to conclude that this is how I'll approach these types of requirements from now on.
The GUI didn't even look as bad as I remember Tkinter looking.
[1] https://tkdocs.com/ https://tkdocs.com/
- Elv13 4y agoQt (the legacy Qt::Widget variant) is quite productive for quick and dirty GUIs. You can do 95% of basic dialogs in QtDesigner and then connect the signals to your code and vice versa. The code can be Python or C++. It can also be mapped 1:1 into SQLite tables without any external libraries, which is handy for basic forms or data apps. QML also has GUI design tools, but it takes much longer to learn and isn't very good at simple GUIs. However it's better when you need to deploy on Android (iOS requires the paid version). One thing to keep in mind if the LGPL3 license. If the app isn't distributed, then it's fine, but if distributed, it has to be dynamically linked with some ways of swapping the .so/.dylib/.dll
- simonh 4y agoQt is fantastic, I've used it with Python using the semi-commercial PyQT and open source PySide which are largely mutually compatible. The example projects that come with it are a great way to get started and the documentation is world class. I found it much easier to work with than the native Windows options 10 years ago, but haven't really looked at anything from MS since.
- pfundstein 4y agoI've often found Qt GUIs to be bloated and slow. Not sure whether that's brought about by Qt inherent overheads or bad design by those using Qt.
- simonh 4y agoThat may be so, but I've used very performant software that used Qt. The desktop version of Google Earth was a Qt application and was amazing. The whole KDE desktop is Qt, as are Ableton Live, Mathematica, and several Adobe and Autodesk apps. If a Qt app has performance issues it's unlikely to be down to the UI layer, unless they're doing something particularly weird. Having said that I have no experience of QML or how it performs.
- AnIdiotOnTheNet 4y agoThere is a rather unfortunate lack of such tools today, which is very annoying. GUIs are visual so creating and editing them visually should be the no-brainer "right way" to do it, but instead programmers have abandoned it and embraced gigantic slow overcomplicated webshit for GUIs. If you have a visual WYSIWYG designer and, importantly, aren't stubbornly intent on reinventing the wheel, then GUI isn't actually that hard.
- wazoox 4y agoPlus Tk has bindings in about every language in existence, so you can choose your favourite : Tcl of course, but also C, C++, Python, Perl, PHP...
- klaussilveira 4y agoGlad I'm not the only one who has been avoiding Lazarus due to Pascal. Too many scars.
- cm2187 4y agoWhy not looking into VB.net? I mean I know that Microsoft is trying to kill it so not sure it is a long term solution, though I would expect long term support even if you don’t get new features. If you are familiar with VB6 there is not a lot of difference. Set keyword removed. All collection zero based instead of inconsistent 0 and 1 based. A null and empty string are two different things. Parameters are byval by default instead of byref by default. And you get lots of nice features: generic, linq, return keyword, try/catch, etc. Otherwise the syntax is the same, and winform also works in a very similar way. I did the transition VB6 => VB.net => C# (the latter when VB got deprecated).