2 & 3) You have probably not deployed all the necessary components to support your application to your friend's Windows 8 machine (it could be XP, Vista or 7 with the same result).

4) Line 18/19 will complain because you have not constructed a QApplication before calling code that tries to paint. This is exactly what the error message is telling you.