Flexible models

This commit is contained in:
Eelke Klein 2018-09-02 10:30:30 +00:00
parent 50cb21b6f9
commit 8b7bbec807
24 changed files with 333 additions and 51 deletions

View file

@ -83,7 +83,7 @@ void PgLabItemDelegate::initStyleOption(QStyleOptionViewItem *option,
Oid oid = InvalidOid;
value = index.data(Qt::UserRole); // get OID
if (value.isValid())
oid = value.toInt(); //getType(index.column());
oid = value.toUInt(); //getType(index.column());
value = index.data(Qt::DisplayRole);
@ -112,7 +112,7 @@ void PgLabItemDelegate::initStyleOption(QStyleOptionViewItem *option,
// option->backgroundBrush = qvariant_cast<QBrush>(index.data(Qt::BackgroundRole));
// disable style animations for checkboxes etc. within itemviews (QTBUG-30146)
option->styleObject = 0;
option->styleObject = nullptr;
}
void PgLabItemDelegate::paint(QPainter *painter,