Initial port to Qt5. Some new features