Not displaying 0 values for int and double columns in table view, but still using a SpinBox delegate when editing.
This commit is contained in:
@ -31,9 +31,9 @@ QWidget* ComboboxDelegate::createEditor(QWidget* parent,
|
||||
void ComboboxDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const {
|
||||
/// Get the value via index of the Model
|
||||
const QAbstractItemModel* localModel = index.model();
|
||||
QString headerText = localModel->headerData(index.column(), Qt::Horizontal).toString();
|
||||
const QString headerText = localModel->headerData(index.column(), Qt::Horizontal).toString();
|
||||
|
||||
UserRoles role = GET_ROLE_FOR_COLUMN(index.column());
|
||||
const UserRoles role = GET_ROLE_FOR_COLUMN(index.column());
|
||||
const bool isShareType = SHARE_TYPE_ROLES.contains(role);
|
||||
const bool isBiddingType = BIDDING_TYPE_ROLES.contains(role);
|
||||
/// Put the value into the SpinBox
|
||||
|
||||
Reference in New Issue
Block a user