mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
parent
60fe81a9b1
commit
ab149e11a3
@ -499,4 +499,11 @@ void CoordinateItemDelegate::setModelData( QWidget *editor, QAbstractItemModel *
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CoordinateItemDelegate::setEditorData( QWidget *editor, const QModelIndex &index ) const
|
||||
{
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>( editor );
|
||||
if ( lineEdit && index.isValid() )
|
||||
{
|
||||
lineEdit->setText( QLocale().toString( index.data( ).toDouble( ) ) );
|
||||
}
|
||||
}
|
||||
|
@ -140,6 +140,9 @@ class APP_EXPORT CoordinateItemDelegate : public QStyledItemDelegate
|
||||
protected:
|
||||
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem & /*option*/, const QModelIndex &index ) const override;
|
||||
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
|
||||
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // QGSVERTEXEDITOR_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user