58
GUI library for C? (lemmy.dbzer0.com)

There are some times that I make something and the terminal isn't enough. I want to make it user-friendly and add buttons and dropdowns and stuff. I mainly write C, so I want a well-known and good GUI library for C. I have tried learning Qt but the documentation was awful and all the examples were for C++ or Python. I also am aware about libraries like imgui but it's more for debugging UIs I think and not for normal applications that end users use.

I also would like the library to be platform-agnostic, or at least just work with Linux because that's what I am using.

If you also code in C, what do you use to make GUIs? What do you suggest me to use?

Thanks in advance.

Also, if anyone suggests Electron or anything involving a browser, I will find them and remove one electron from each atom of theirs, turning them into smoke.

you are viewing a single comment's thread
view the rest of the comments
[-] communism@lemmy.ml 12 points 1 day ago

GTK? Depends on how important cross-platform support is for you. I've heard GTK programs don't look great on Windows, but it does support Windows. GTK is written in C as well—Qt is in C++ so that might be where some of your problems are coming from, I've not tried making any kind of GUIs in C though.

[-] who@feddit.org 5 points 23 hours ago* (last edited 2 hours ago)

I’ve heard GTK programs don’t look great on Windows,

They don't look great anywhere, not even on Linux, unless you happen to be using a Gtk-based desktop.

However, Gtk does have one thing going for it: the API is native to C, so it is easier to work with in that language (and easier to bind to other languages) than something like Qt would be.

[-] communism@lemmy.ml 2 points 15 hours ago

If you use a gtk theme they look fine. Most Linux users will have a gtk theme.

[-] who@feddit.org 2 points 7 hours ago* (last edited 7 hours ago)

Some Linux users will have a theme for Gtk apps that make them look somewhat like their desktop's native apps, but they often still look out of place. And Gtk has long had a habit of breaking those themes in minor version updates. And modern Gtk pushes client-side window decorations, which completely defeat window manager functionality that is native to non-Gtk desktops, making the app not only look terrible but also not behave correctly. And even if a perfectly matched theme existed (I have never seen one), the inputs for common controls won't be the same as native ones, so the app won't operate correctly.

In other words, nope, what you are referring to does not solve the problem.

this post was submitted on 14 Dec 2025
58 points (100.0% liked)

Programming

23900 readers
261 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS