Do you use the Qt Creator environment directly for the modifications you have made ?
No. I use Visual Studio 2022 for almost everything except looking at the Qt examples. For that I configure Qt Creator with the VC++ kit, so I use the same compiler in both cases.

To edit your code, I opened your sln file in Visual Studio and made the changes to the project properties to support my Qt version 5.15.3, VC++ version, and Windows toolkit version. And except for changing the Qt::StringLiterals to ordinary strings, I didn't change your code at all.

So you always compile inside Qt Creator ?
No, see above. All of my projects are created inside of Visual Studio 2022 using the Qt Visual Studio plugin, and everything is compiled there. When you ask the Qt plugin to create a Qt QWidget-based class, it automatically creates the .ui file. When you double-click the ui file in the VS Solution Explorer window, it automatically executes Qt Designer to open the form for editing. When I am done editing, I save the changes, close Designer, and go back into Visual Studio to build.

Which compiler do you use MinGW or Visual C++ ?
VC++ only.

If you are using Visual Studio for your development, there is really no reason for you to be using Qt Creator at all. If you don't have it already, install the Qt VS Tools for Visual Studio and you can do everything you need using only Visual Studio and Qt Designer.