Fixed toggle switch painting, part I

This commit is contained in:
2026-03-30 21:24:29 +02:00
parent 842129931f
commit b40f3cbd14
6 changed files with 72 additions and 50 deletions

View File

@@ -168,6 +168,7 @@ Qt::ItemFlags BCValueModel::flags(const QModelIndex& index) const
if( row>-1 && row<_valueList.size() )
{
const BCValue& bcValue = *_valueList[row].get();
//qDebug() << " --- flags: " << bcValue.label() << " Ro: " << bcValue.isReadOnly() << " Bool: " << bcValue.isBoolean();
flag = bcValue.isReadOnly() ? flag : flag|Qt::ItemIsEditable|Qt::ItemIsEnabled;
}
return flag;