function data(QModelIndex $index, $role) { return new QVariant("test" . $index->column() . $index->row()); }
/** * @param QModelIndex $parent * @return int */ public function columnCount(QModelIndex $parent) { if ($parent->isValid()) { return $parent->internalPointer()->columnCount(); } else { return $this->rootItem->columnCount(); } }