To reproduce, in Designer mode of QtCreator:
1. Add Spacer (Vertical or Horizontal) onto some widget with layout.
2. Reset sizeHint to default in properties panel
It will generate code like this:
Compiling this code with uic will generate compilable, but incorrect C++ code, which will lead to incorrect Spacer behavior:
QSpacerItem constructor signature is:
So, in generated C++ code two actual QSizePolicy arguments will be implicitly cast to int, and used as width and height, while formal hData and wData will silently get default values. It's incorrect of course.