Updated to support PyQt5