If you change a file containing Qt code and start the build process, "Qt" doesn't "touch" your file, the C++ compiler does. It is completely no difference whether your project uses Qt or not. If changes made in the file are not reflected then it means the file was not recompiled or that what you see doesn't come from the file you thought it comes from. Sometimes people have two files with the same name and simply change the wrong one or they have two copies of code producing some result in their project and they are changing one but then looking at results of the other. To verify whether any of these is the case, the simplest way is to make a syntax error in the file. If the project builds afterwards then it means the compiler didn't even parse the source file (again, Qt having nothing to do with that as it is only used runtime).
The code in your initial post looks correct and should provide a valid layout setup.





Reply With Quote
Bookmarks