diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-07 09:47:09 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-07 09:47:09 +0200 |
| commit | 2868467137fe193cb48dde9560656dbd6e4bde82 (patch) | |
| tree | 9037bbd5c9761ea9d8d6728c599076df937c0d0c /src/blog | |
| parent | 55571a38e5443f774d0d276de116034615515635 (diff) | |
| download | sebastiano.tronto.net-2868467137fe193cb48dde9560656dbd6e4bde82.tar.gz sebastiano.tronto.net-2868467137fe193cb48dde9560656dbd6e4bde82.zip | |
Update to blog post
Diffstat (limited to 'src/blog')
| -rw-r--r-- | src/blog/2025-04-04-qt-minimal/qt-minimal.md | 35 |
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 | |||
| 104 | When I shared this post on LinkedIn, I asked if anyone could prompt an | ||
| 105 | LLM to build a QT app without QT Creator or CMake. A colleague did, | ||
| 106 | and the catbot's (pun intended) response can be found | ||
| 107 | [here](https://chat.mistral.ai/chat/fa3e3a76-0e8c-4135-94a1-ae7735174e93). | ||
| 108 | |||
| 109 | This 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 | ||
| 111 | with QT, like moc and uic. This tool reads a `.pro` file that describes | ||
| 112 | the 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, | ||
| 114 | but it does not require more external dependencies; I think I might use | ||
| 115 | this other approach in the future. | ||
| 116 | |||
| 117 | The chat bot's response is great, but it is "only" 99% | ||
| 118 | accurate. Unfortunately this means that if one blindly follows these | ||
| 119 | instructions, they won't get a working QT application. The problem is | ||
| 120 | with the commands: | ||
| 121 | |||
| 122 | ``` | ||
| 123 | qmake -project | ||
| 124 | qmake | ||
| 125 | ``` | ||
| 126 | |||
| 127 | The first one is completely useless, and actually prevents the project | ||
| 128 | from being built by generating a second project file. If one simply | ||
| 129 | ignores the `qmake -project` line, the instructions become correct. | ||
| 130 | |||
| 131 | This story is quite insightful: the chat bot gave me instructions that are | ||
| 132 | almost 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 | ||
| 134 | instructions easily in a couple of minutes, but someone without the same | ||
| 135 | experience would have probably struggled for much longer. | ||
