Debugging mistakes is part of developing software. It seems like I have spent at least half of my software development career debugging mistakes in code. I'd like to say that it was other people's code, but it has mostly been in mine. Luckily, I have caught most of them while I was developing the code, but occasionally some slipped past.
Qt Creator comes with built-in C++ and QML (a Qt language) debugging support. Now is a good time to use it to find the mistake in our code.