Updated for Qt 5.