(
        items: Iterable[Mapping[Qt.ItemDataRole, Any]],
        parent: Optional[QObject] = None,
)
return model
Create list model from an item date iterable.
Create list model from an item date iterable.
Create list model from an item date iterable .
def create_list_model(
        items: Iterable[Mapping[Qt.ItemDataRole, Any]],
        parent: Optional[QObject] = None,
) -> QStandardItemModel:
    """Create list model from an item date iterable."""
    model = QStandardItemModel(parent)
    for item in items:
        sitem = QStandardItem()
        for role, value in item.items():
            sitem.setData(value, role)
        model.appendRow([sitem])
    return model
def create_list_model ( items : Iterable [ Mapping [ Qt . ItemDataRole , Any ] ] , parent : Optional [ QObject ] = None , ) -> QStandardItemModel : model = QStandardItemModel ( parent ) for item in items : sitem = QStandardItem ( ) for role , value in item . items ( ) : sitem . setData ( value , role ) model . appendRow ( [ sitem ] ) return model