I realize this is a very broad question, so to help I’ll mention that my primary experience with any programming language is Python. I’ve looked into C and C++ as well, but I haven’t written much in them; in part because they’re more involved, and in part because I get lost in the IDE weeds with’em (whether choosing an IDE or getting it configured to even get started tbh, but that’s mostly a different topic).
In Python I know there’s an option in Tkinter, and I’ve worked with it to some extent but never got entirely comfortable with it. Maybe it would be best to try making some more stuff with it instead of bouncing around different things, but would that be advisable over something that may be better suited to the task?
If it would be better to stick with it, what might be some things you wish you’d known starting out with GUI programming (whether particular to Python or generally applicable)?
While so many things are so much better than they used to be in the programming ecosystem, I feel like entry-level GUI programming is so much worse.
This will probably be an unpopular opinion, but Visual Basic (pre .NET) was one of the easiest ways to make a simple, contemporary (for the time) GUI. Drag and drop some elements, modify the UI properties, double click and add code. It made for an excellent introduction to programming because the UI portions were simple and intuitive enough to stay out of the way.
The rest of VB wasn’t great. Weird language/syntax/keywords keywords, closed environment, mediocre tooling. But for building UIs? I haven’t used anything as easy as that and it’s been over 20 years now…
I don’t have any recommendations unfortunately. Almost everything I do is web based or command line. Web UIs aren’t terrible, but there’s a learning curve and lots of limitations. Haven’t found anything for desktop apps I like lately (last one I built was also with tkinter for a small Python project. Bleh.)
Oh man this takes me way back. VB’s pick and drop UI builder was so magical. I used to do complex wizard based forms that are probably terrible if I look at them now (If I still preserved them… unfortunately I didn’t) but at the time they looked professional.
PyQt is pretty good and Qt is widely used, so may also be worth a look. The Qt designer is a nice way to separate out the look of the GUI elements, then work on connecting the app functionality to that after. I think the key is to start on something simple and work up, partially to learn the library and partially to learn the pitfalls of GUI development as you add features etc.
Is there something else like the Qt designer for working with PyQt/PySide? I looked on their site and even dug through to the open source licensed versions, but all the available installers seem to insist on making an account to proceed with installation. If that’s a no-go, then I may still try it at some point just without that tool.
The official one is https://pypi.org/project/PySide6/ and it includes some kind of designer for UI files (https://doc.qt.io/qtforpython-6/tools/pyside-designer.html). I use it at work to preview code meant for C++ and it works fine. The installation is easy too with pip.
https://www.pythontutorial.net/pyqt/qt-designer/
This should help. I believe the .ui files will work with both PyQt and PySide but I haven’t personally tried.
Yeah they will. The .UI files are handled by the cpp lib, so any wrapping lib will know what to do (code completion is a bitch with it though)
I’d argue pyside is preferred to pyqt (pyside2 is the latest bindings for qt5 iirc). And personally, Ive found its documented very well and there are a lot of great (and not great) examples to find on the web.
I started learning c++ through qt, so imo pyside is a great way for UI logic in an easy language -> take known UI logic to c++ -> learn c++ more in general -> learning a second language opens you up to any subsequent languages because of how it teaches you to think. (Not that c++ is useful as a second language specifically, just another language in general starts opening you mind up a bit, especially if it uses different paradigms)
Edit: oh god, pyside6 is the latest. https://www.pythonguis.com/blog/pyside-tutorial-now-available/
Sorry to that guy, but Python is a terrible choice for GUI. It simply doesn’t even exist in the wild, except in newbies’ minds. You should pick something that allows you to* easily & immediately* reload your GUI in progress without restarting the program; AND also maybe think about how to distribute your GUI on other computers without requiring them to duplicate your python setup