The files generated by uic
in Qt 5 will have #include <QtWidgets/QFoo>
, which of course doesn't work in Qt 4.
Or are you talking about .ui
files generated by Qt Designer / Creator? Those will instead work without changes (modulo using Qt 5-only or Qt 4-only classes, of course).