Does it work when compiling against a dynamic Qt? The error is a linker error and is very likely to be found not in the code. The code already compiled fine when the linker starts its work.