def askUser(text, parent=None, help='', defaultno=False, msgfunc=None, title='Anki'):
 if (not parent):
  parent = aqt.mw.app.activeWindow()
 if (not msgfunc):
  msgfunc = QMessageBox.question
 sb = (QMessageBox.Yes | QMessageBox.No)
 if help:
  sb |= QMessageBox.Help
 while 1:
  if defaultno:
   default = QMessageBox.No
  else:
   default = QMessageBox.Yes
  r = msgfunc(parent, title, text, sb, default)
  if (r == QMessageBox.Help):
   openHelp(help)
  else:
   break
 return (r == QMessageBox.Yes)

def askUser ( text , parent = None , help = '' , defaultno = False , msgfunc = None , title = 'Anki' ) : if ( not parent ) : parent = aqt . mw . app . activeWindow ( ) if ( not msgfunc ) : msgfunc = QMessageBox . question sb = ( QMessageBox . Yes | QMessageBox . No ) if help : sb |= QMessageBox . Help while 1 : if defaultno : default = QMessageBox . No else : default = QMessageBox . Yes r = msgfunc ( parent , title , text , sb , default ) if ( r == QMessageBox . Help ) : openHelp ( help ) else : break return ( r == QMessageBox . Yes )
show a yes/no question .