summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/doc/snippets')
-rw-r--r--src/widgets/doc/snippets/qitemdelegate/spinbox-delegate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/doc/snippets/qitemdelegate/spinbox-delegate.cpp b/src/widgets/doc/snippets/qitemdelegate/spinbox-delegate.cpp
index efe8a16733..5a73d551b5 100644
--- a/src/widgets/doc/snippets/qitemdelegate/spinbox-delegate.cpp
+++ b/src/widgets/doc/snippets/qitemdelegate/spinbox-delegate.cpp
@@ -49,7 +49,7 @@ QWidget *SpinBoxDelegate::createEditor(QWidget *parent,
void SpinBoxDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const
{
- int value = index.model()->data(index, Qt::EditRole).toInt();
+ int value = index.data(Qt::EditRole).toInt();
QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
spinBox->setValue(value);