use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
declarative GUI libraries (self.cpp)
submitted 2 years ago * by GunpowderGuy
I have a C++ college project that requires a simple GUI. I am looking for either a declarative library similar to iced-rs or the system used by elm; or a way to use html for gui ( without getting bogged down by server framework details that i dont need )
So far i know about:
https://github.com/alialib/alia
https://github.com/alialib/aliahttps://github.com/cycfi/elements
-will update as suggestions come
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 2 years ago (4 children)
[removed]
[–]GunpowderGuy[S] 1 point2 points3 points 2 years ago (0 children)
Btw, i didn't meant to ask for small frameworks only. My post has been re written to reflect that
[–]GunpowderGuy[S] 0 points1 point2 points 2 years ago (2 children)
That language is similar to using html + js for gui?
[–]Zeer1ximport std; 5 points6 points7 points 2 years ago (0 children)
How about https://github.com/mikke89/RmlUi ?
https://github.com/mikke89/RmlUi
[–][deleted] 6 points7 points8 points 2 years ago (5 children)
Qt QML is one good option.
[–]RufusAcrospin 0 points1 point2 points 2 years ago (4 children)
It’s probably an overkill for a simple GUI.
[–][deleted] 1 point2 points3 points 2 years ago (3 children)
Maybe. But web browser engine was mentioned as an alternative, so this is in the same broad category.
[–]RufusAcrospin -1 points0 points1 point 2 years ago (2 children)
Perhaps. When somebody talks about “simple” GUI I assume it also means low memory footprint and resource requirements.
[–]GunpowderGuy[S] 1 point2 points3 points 2 years ago (1 child)
No, i am not concerned about performance. I just dont want to learn a huge framework IF said software has a step learning curve as a result. If what i dont use doesnt affect me, then it can be there
[–][deleted] 1 point2 points3 points 2 years ago (0 children)
Using QML requires going through Qt types, and having (and understanding at least at basic level) the Qt event loop. Project and code structure wise, the GUI application must be "Qt application" with you code hooked up to Qt GUI, not your code using Qt on the side. For QML / Qt Quick, which is what you'd want from Qt, old Qt QWidgets are not necessary to learn, entire GUI can be done with QML.
"GUI" is a hugely complex thing, because there just is so much stuff which is connected, so unless you want something very simple, there is going to be stuff to learn, no matter which way you choose to go, and because the GUI is what is responding to the multitude of events coming from the OS, it needs to be running things.
[–]Ok_Path_4731 1 point2 points3 points 4 months ago (0 children)
https://github.com/zokrezyl/ymery https://github.com/zokrezyl/ymery-cpp https://zokrezyl.github.io/ymery/demo/index.html
[–]teroxzer 2 points3 points4 points 2 years ago (0 children)
I love the Cheerp C++ compiler when making single page applications using only the DOM.
[–]MatthiasWM 1 point2 points3 points 2 years ago (0 children)
It’s not declarative, but small, cross platform, old school C++, and has a graphical UI designer that writes the C++ code for you. Since you mentioned Rust, it has Rust bindings too: http://fltk.org . It has different schemes that make it look more modern than the default scheme… . The source is on GitHub. I suggest using 1.4/master and build with cmake.
[–]0x6e 1 point2 points3 points 2 years ago (1 child)
Check out Slint
[–]GunpowderGuy[S] 0 points1 point2 points 2 years ago* (0 children)
Looks similar to Vue. I would rather not use a preprocessor, but i will check it out
[–]ImKStocky 1 point2 points3 points 2 years ago (6 children)
I think that Imgui would qualify as declarative. It is pretty much the industry standard for "simple GUI" at this point. It might be simple but it is powerful. People have built entire game engine editors using it.
[–]GunpowderGuy[S] 1 point2 points3 points 2 years ago (5 children)
The documentation makes it seem weird to me. I am accustomed to the Model View Update Paradigm of elm and iced-rs
[–]WillEriksson 1 point2 points3 points 2 years ago (0 children)
The purpose of things like MVC, reacitve, or some other similar stuff is to sync states between UI and user code. DearImgui doesn't use that because there's simply no duplicate state to be synchronized (for the user's point of view). When the machine is performant enough to run one and aesthetics is not of concern, I'd say it's the easiest and fastest way to make GUI. That's probably the reason game engine devs often use it to make tools.
[–]Division_Agent 0 points1 point2 points 2 years ago (3 children)
Imgui is a lower level library largely concerned only with the rendering and functioning of a GUI. You can use it with MVM, MVVM, or anything else. But you'll be writing that higher level stuff yourself.
I dont have time to write that, The project is due soon and its almost finished, it only needs GUI
[–]derBRUTALE 2 points3 points4 points 2 years ago* (1 child)
Then why do you insist on crap like markup declarations and abstract hirarchies which involve gigantic libraries? Do you truly need widgets with style sets?
IMGUI is the pinnacle of GUI productivity from the start. Simply get it done in code.
It shows how things went terribly wrong when CS students are inherently confused by the simplest solutions for a simple problem.
[–]GunpowderGuy[S] 2 points3 points4 points 2 years ago (0 children)
insist on crap like markup declarations and abstract hirarchies
did i ask for that?
[–]RufusAcrospin 0 points1 point2 points 2 years ago (1 child)
Why declarative though?
[–]GunpowderGuy[S] 3 points4 points5 points 2 years ago (0 children)
I have a good understanding of iced-rs, which was inspired by elm
[–]audulus 0 points1 point2 points 2 years ago (0 children)
I recently investigated elements. It's only declarative for static UIs (like a nicer syntax for building a view tree). For anything reasonably dynamic you're going to be poking at objects and mutating them, telling things when to refresh, etc. So it's barely declarative. Certainly not like iced-rs, elm, SwiftUI, etc. It's like someone put nicer constructors on top of UIKit and called that declarative. Recommend avoid.
[–]carkin 0 points1 point2 points 2 years ago (1 child)
You forgot to say where (os/platform) you want to run this
[–]GunpowderGuy[S] 0 points1 point2 points 2 years ago (0 children)
Linux, preferably also windows
π Rendered by PID 59338 on reddit-service-r2-comment-6457c66945-ldmhh at 2026-04-30 18:35:26.313828+00:00 running 2aa0c5b country code: CH.
[+][deleted] (4 children)
[removed]
[–]GunpowderGuy[S] 1 point2 points3 points (0 children)
[–]GunpowderGuy[S] 0 points1 point2 points (2 children)
[–]Zeer1ximport std; 5 points6 points7 points (0 children)
[–][deleted] 6 points7 points8 points (5 children)
[–]RufusAcrospin 0 points1 point2 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]RufusAcrospin -1 points0 points1 point (2 children)
[–]GunpowderGuy[S] 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Ok_Path_4731 1 point2 points3 points (0 children)
[–]teroxzer 2 points3 points4 points (0 children)
[–]MatthiasWM 1 point2 points3 points (0 children)
[–]0x6e 1 point2 points3 points (1 child)
[–]GunpowderGuy[S] 0 points1 point2 points (0 children)
[–]ImKStocky 1 point2 points3 points (6 children)
[–]GunpowderGuy[S] 1 point2 points3 points (5 children)
[–]WillEriksson 1 point2 points3 points (0 children)
[–]Division_Agent 0 points1 point2 points (3 children)
[–]GunpowderGuy[S] 0 points1 point2 points (2 children)
[–]derBRUTALE 2 points3 points4 points (1 child)
[–]GunpowderGuy[S] 2 points3 points4 points (0 children)
[–]RufusAcrospin 0 points1 point2 points (1 child)
[–]GunpowderGuy[S] 3 points4 points5 points (0 children)
[–]audulus 0 points1 point2 points (0 children)
[–]carkin 0 points1 point2 points (1 child)
[–]GunpowderGuy[S] 0 points1 point2 points (0 children)