Port to Qt5.

To compile for Qt5, pass -DUSE_QT5=true to cmake.