# class PasswordDialog

###

Module | kio
Namespace | KIO
Class | PasswordDialog
Inherits | KPasswordDialog

Deprecated use KPasswordDialog A dialog for requesting a login and a password from the end user.

KIO-Slave authors are encouraged to use SlaveBase.openPassDlg instead of directly instantiating this dialog. dialog for requesting login and password from the end user

### methods

- PasswordDialog (prompt, user, enableKeep, modal, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  prompt | QString |
  user | QString |
  enableKeep | bool | 0
  modal | bool | 1
  parent | QWidget | 0

  Create a password dialog.

  prompt - instructional text to be shown.

  user - username, if known initially.

  enableKeep - if true, shows checkbox that makes password persistent until KDE is shutdown.

  modal - if true, the dialog will be modal (default:true).

  parent - the parent widget (default:NULL).

- getNameAndPassword (user, pass, keep, prompt, readOnly, caption, comment, label)

  returns int, bool (keep)
  static

  Argument | Type | Default
  --- | --- | ---
  user | QString |
  pass | QString |
  keep | bool |
  prompt | QString | QString()
  readOnly | bool | 0
  caption | QString | QString()
  comment | QString | QString()
  label | QString | QString()

  A convienence static method for obtaining authorization information from the end user.

  user - username

  pass - password

  keep - pointer to flag that indicates whether to keep password (can be null)

  prompt - text to display to user.

  readOnly - make the username field read-only.

  caption - set the title bar to given text.

  comment - extra comment to display to user.

  label - optinal label for extra comment.

  Returns Accepted/Rejected based on the user choice.