forked from qt-creator/qt-creator
QmlDesigner: Fix range for "Fixed Frame" in Timeline settings
Change-Id: I71bdae7144ae91b9b8b8c8e2088b87310d2f4a2e Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -95,6 +95,13 @@ TimelineEditorDelegate::TimelineEditorDelegate(QWidget *parent)
|
|||||||
setItemEditorFactory(factory);
|
setItemEditorFactory(factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSpinBox *createSpinBox(QWidget *parent)
|
||||||
|
{
|
||||||
|
auto spinBox = new QSpinBox(parent);
|
||||||
|
spinBox->setRange(-10000, 10000);
|
||||||
|
return spinBox;
|
||||||
|
}
|
||||||
|
|
||||||
QWidget *TimelineEditorDelegate::createEditor(QWidget *parent,
|
QWidget *TimelineEditorDelegate::createEditor(QWidget *parent,
|
||||||
const QStyleOptionViewItem &option,
|
const QStyleOptionViewItem &option,
|
||||||
const QModelIndex &index) const
|
const QModelIndex &index) const
|
||||||
@@ -102,7 +109,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent,
|
|||||||
QWidget *widget = nullptr;
|
QWidget *widget = nullptr;
|
||||||
|
|
||||||
if (index.column() == TimelineSettingsModel::FixedFrameRow)
|
if (index.column() == TimelineSettingsModel::FixedFrameRow)
|
||||||
widget = new QSpinBox(parent);
|
widget = createSpinBox(parent);
|
||||||
else
|
else
|
||||||
widget = QStyledItemDelegate::createEditor(parent, option, index);
|
widget = QStyledItemDelegate::createEditor(parent, option, index);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user