In Laravel, the story has a door: public/index.php. I can always start there.
In the Qt project I opened, I searched for main.cpp as if it were public/index.php. Sometimes it is there, next to a CMakeLists.txt that looks like a dare. Sometimes the project is QML-first and main is a small C++ file that exists to start the engine, and the “application” you care about is a tree of .qml files.
I was looking for a front controller. I found a runtime.
What I understand so far
- Widgets projects often look more like “C++ with a UI”.
main.cppcreates a widget or aQApplicationand you can follow calls. - QML projects still have C++, but the screen you are staring at may not be editable in Qt Designer the way a
.uifile is. I lost time on that. See discovering the UI was QML. - CMakeLists.txt is not Composer. It is the map of what gets compiled. TIL.
The useful reframe
main.cpp is not index.php. It does not run again on every click. It starts a process that lives until the user quits. Once I stopped hunting for a per-request entrypoint, the file - when it exists - looked obvious: construct the application, load QML or show a window, exec() the event loop.
If you are hunting for a front controller, you brought the web map. The file - when it exists - starts a process. Clicks do not start another one.