aqt.tagedit
===========

.. py:module:: aqt.tagedit


Classes
-------

.. autoapisummary::

   aqt.tagedit.TagEdit
   aqt.tagedit.TagCompleter


Module Contents
---------------

.. py:class:: TagEdit(parent: QWidget, type: int = 0)

   Bases: :py:obj:`QLineEdit`


   .. py:attribute:: lostFocus


   .. py:attribute:: col
      :type:  anki.collection.Collection | None
      :value: None



   .. py:attribute:: model


   .. py:attribute:: type
      :value: 0



   .. py:method:: setCol(col: anki.collection.Collection) -> None

      Set the current col, updating list of available tags.



   .. py:method:: focusInEvent(evt: QFocusEvent | None) -> None


   .. py:method:: keyPressEvent(evt: QKeyEvent | None) -> None


   .. py:method:: showCompleter() -> None


   .. py:method:: focusOutEvent(evt: QFocusEvent | None) -> None


   .. py:method:: hideCompleter() -> None


.. py:class:: TagCompleter(model: QStringListModel, parent: QWidget, edit: TagEdit)

   Bases: :py:obj:`QCompleter`


   .. py:attribute:: tags
      :type:  list[str]
      :value: []



   .. py:attribute:: edit


   .. py:attribute:: cursor
      :type:  int | None
      :value: None



   .. py:method:: splitPath(tags: str | None) -> list[str]


   .. py:method:: pathFromIndex(idx: QModelIndex) -> str


