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