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)?

  • Tom@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    10 months ago

    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.)

    • MadhuGururajan@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      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.

  • slurp@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    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.

  • squirmy_wormy@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    edit-2
    10 months ago

    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/

  • kSPvhmTOlwvMd7Y7E@programming.dev
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    10 months ago

    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