how about adding this to your .pro:

Qt Code:
  1. CONFIG += link_pkgconfig
  2. PKGCONFIG += xi
To copy to clipboard, switch view to plain text mode 

and maybe you need to read this and this.