r/cpp • • Oct 25 '26

Pain of making a native GUI in cpp

So I just wanted to vent about the absolute pain of making a working gui in cpp, I am working on a scientific project to make an openFOAM gui and browse openFOAM code to add TENO schemes to it from scientific papers such as Fu et al and working through the binaries.

I have not used AI in this project because CFD is very delicate and quite frankly, AI is not ready for such complexity - especially numerical schemes such as TENO, I ended up writing the meshing, topological code and mathematics myself and by far, the hardest part was the gui coordinates and memory management. I wanted to PULL MY HAIR OUT because of managing segfaults, crashes because of a random pointer hidden inside a 2000 line function, I had to also manage internal functions of openfoam(and you know how that goes), boundary conditions, and mesh topology, it was driving me nuts. I generally regard myself as fluent in programming languages such as cpp, python, rust etc, but this is a whole nother of level data management.

in the end it turned out to be a pretty good contribution to the openFOAM community, hopefully the project will mature further and I will be able to write a paper on it.

0 Upvotes

50 comments sorted by

View all comments

Show parent comment

0

u/Big_Target_1405 Oct 25 '26 edited Oct 25 '26

Name them?

wxWidgets uses Qt, GTK+ and Windows as a backend so can't offer anything Qt can't

GtkMM would be horrendous to build and distribute cross platform and the website doesn't even exist right now

What else?

5

u/draeand Oct 25 '26

Uh... WX does not use QT as a backend. If it does I'd appreciate a source.

-2

u/AvidCoco Oct 25 '26

7

u/Big_Target_1405 Oct 25 '26

Yeah, nobody is writing anything important in such an obscure framework.

For anything serious you might want to actually pass to customers, and support well, while being cross platform, it's basically Qt

5

u/AvidCoco Oct 25 '26

Lmao do you get paid by Qt or something?

Every GUI framework exists for a reason. Just because you wouldn’t use it doesn’t mean it’s “obscure”. Qt is massively overkill for most projects.

4

u/Big_Target_1405 Oct 25 '26

I wrote a commercial cross platform GUI application professionally for several years, across Linux, Windows and macOS

Nothing except Qt was actually worth our time as a small shop with just a few developers

As soon as you need to go cross platform the maintenance cost increases dramatically

2

u/AvidCoco Oct 25 '26

Yes and I also did that and we specifically avoided Qt.

1

u/Chaosvex Oct 27 '26

So, what did you use?