Class: QgsEncodingSelectionDialog

A dialog which presents the user with a choice of file encodings.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsEncodingSelectionDialog

Base classes

QDialog

QWidget

QObject

QPaintDevice

Methods

encoding

Returns the encoding selected within the dialog.

setEncoding

Sets the encoding selected within the dialog.

class qgis.gui.QgsEncodingSelectionDialog[source]

Bases: QDialog

__init__(parent: QWidget | None = None, caption: str | None = '', encoding: str | None = '', flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())

Constructor for QgsEncodingSelectionDialog.

If caption is set, it will be used as the caption within the dialog.

The encoding argument can be used to specify the encoding initially selected in the dialog.

Parameters:
  • parent (Optional[QWidget] = None)

  • caption (Optional[str] = '')

  • encoding (Optional[str] = '')

  • flags (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())

encoding(self) str[source]

Returns the encoding selected within the dialog.

See also

setEncoding()

Return type:

str

setEncoding(self, encoding: str | None)[source]

Sets the encoding selected within the dialog. see encoding()

Parameters:

encoding (Optional[str])