Fix build using Qt 5.x

Just include widgets for qt5 and gui for qt4. In the future, we should
think about using the new elements instead of using the compatibility
ones.