Modified Rich's code to compile for qt4 (can't get qt5 on the board)