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

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?