"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

PyPI(PyQt6): https://pypi.org/project/IceSpringPySideStubs-PyQt6

Generated by BaiJiFeiLong@gmail.com

License: MIT
"""
import typing
from PyQt6 import QtWidgets
from PyQt6 import QtCore


class QSqlRelationalDelegate(QtWidgets.QStyledItemDelegate):
    """
    https://doc.qt.io/qt-6/qsqlrelationaldelegate.html

    **Detailed Description**

    Unlike the default delegate, QSqlRelationalDelegate provides a combobox for
    fields that are foreign keys into other tables. To use the class, simply
    call **QAbstractItemView::setItemDelegate** () on the view with an instance
    of QSqlRelationalDelegate:

    std::unique_ptr<**QTableView** > view{new **QTableView** };
    view->setModel(model);
            view->setItemDelegate(new
    **QSqlRelationalDelegate** (view.get()));

    The **Relational Table Model**  example (shown below) illustrates how to use
    QSqlRelationalDelegate in conjunction with **QSqlRelationalTableModel**  to
    provide tables with foreign key support.

    ![](images/relationaltable.png)

    **See also** **QSqlRelationalTableModel**  and **Model/View Programming** .
    """

    def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelationaldelegate.html#QSqlRelationalDelegat
        e

        **QSqlRelationalDelegate::QSqlRelationalDelegate(QObject * parent =
        nullptr)**

        Constructs a QSqlRelationalDelegate object with the given **parent**.
        """
        ...

    def setModelData(
        self,
        editor: QtWidgets.QWidget,
        model: QtCore.QAbstractItemModel,
        index: QtCore.QModelIndex,
    ) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelationaldelegate.html#setModelData

        **[override virtual] void QSqlRelationalDelegate::setModelData(QWidget *
        editor , QAbstractItemModel * model , const QModelIndex & index )
        const**

        Reimplements: **QStyledItemDelegate::setModelData(QWidget *editor,
        QAbstractItemModel *model, const QModelIndex &index) const** .
        """
        ...

    def setEditorData(
        self, editor: QtWidgets.QWidget, index: QtCore.QModelIndex
    ) -> None:
        ...

    def createEditor(
        self,
        parent: QtWidgets.QWidget,
        option: QtWidgets.QStyleOptionViewItem,
        index: QtCore.QModelIndex,
    ) -> QtWidgets.QWidget:
        """
        https://doc.qt.io/qt-6/qsqlrelationaldelegate.html#createEditor

        **[override virtual] QWidget
        *QSqlRelationalDelegate::createEditor(QWidget * parent , const
        QStyleOptionViewItem & option , const QModelIndex & index ) const**

        Reimplements: **QStyledItemDelegate::createEditor(QWidget *parent, const
        QStyleOptionViewItem &option, const QModelIndex &index) const** .
        """
        ...
