aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/blog/2025-04-04-qt-minimal/qt-minimal.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/blog/2025-04-04-qt-minimal/qt-minimal.md b/src/blog/2025-04-04-qt-minimal/qt-minimal.md
index 6f112bb..4cc0e18 100644
--- a/src/blog/2025-04-04-qt-minimal/qt-minimal.md
+++ b/src/blog/2025-04-04-qt-minimal/qt-minimal.md
@@ -98,3 +98,38 @@ And finally you can enjoy your new app:
98``` 98```
99./run 99./run
100``` 100```
101
102## Update 2025-04-07 - now with AI!
103
104When I shared this post on LinkedIn, I asked if anyone could prompt an
105LLM to build a QT app without QT Creator or CMake. A colleague did,
106and the catbot's (pun intended) response can be found
107[here](https://chat.mistral.ai/chat/fa3e3a76-0e8c-4135-94a1-ae7735174e93).
108
109This solution is different from the one I found. The bot opted for using
110[qmake](https://doc.qt.io/qt-6/qmake-manual.html), another tool bundled
111with QT, like moc and uic. This tool reads a `.pro` file that describes
112the project's structure and build configuration, and it generates a
113`Makefile`. This method is a bit more black-boxy than the one I found,
114but it does not require more external dependencies; I think I might use
115this other approach in the future.
116
117The chat bot's response is great, but it is "only" 99%
118accurate. Unfortunately this means that if one blindly follows these
119instructions, they won't get a working QT application. The problem is
120with the commands:
121
122```
123qmake -project
124qmake
125```
126
127The first one is completely useless, and actually prevents the project
128from being built by generating a second project file. If one simply
129ignores the `qmake -project` line, the instructions become correct.
130
131This story is quite insightful: the chat bot gave me instructions that are
132almost correct (so technically they are *incorrect*). With my experience
133(a whole 5 hours of CV-worthy QT development) I was able to fix these
134instructions easily in a couple of minutes, but someone without the same
135experience would have probably struggled for much longer.

Generated with cgit - Back to sebastiano.tronto.net