Ported to Qt 5 (closes #7)