diff options
Diffstat (limited to 'src/widgets/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index baeba1759c..e1b6f52225 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -3138,7 +3138,7 @@ int QAbstractItemView::sizeHintForColumn(int column) const Opens a persistent editor on the item at the given \a index. If no editor exists, the delegate will create a new editor. - \sa closePersistentEditor() + \sa closePersistentEditor(), isPersistentEditorOpen() */ void QAbstractItemView::openPersistentEditor(const QModelIndex &index) { @@ -3157,7 +3157,7 @@ void QAbstractItemView::openPersistentEditor(const QModelIndex &index) /*! Closes the persistent editor for the item at the given \a index. - \sa openPersistentEditor() + \sa openPersistentEditor(), isPersistentEditorOpen() */ void QAbstractItemView::closePersistentEditor(const QModelIndex &index) { @@ -3172,6 +3172,19 @@ void QAbstractItemView::closePersistentEditor(const QModelIndex &index) } /*! + \since 5.10 + + Returns whether a persistent editor is open for the item at index \a index. + + \sa openPersistentEditor(), closePersistentEditor() +*/ +bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex &index) const +{ + Q_D(const QAbstractItemView); + return d->editorForIndex(index).widget; +} + +/*! \since 4.1 Sets the given \a widget on the item at the given \a index, passing the |