Check devices exist before accessing

The application was expecting at least one device to be found on the
system, which crashed when this wasn't the case. Added checking to
attempt to protect this issue.
Updated code to be Qt5 compatible

Directed project to use updated library location as QApplication
components have been moved under the QWidgets namespace instead of
QtGui.
Fixed crash on application load

Reimplementation of QApplication was causing a crash due to an
inconsistancy in the constructor arguments.

Qt application can now start correctly on Ubuntu 13.10.