Changing from QWidget to QDialog lostpass class