Method: Qt::StandardItemModel#each_row

Defined in:
lib/ruber/qt_sugar.rb

#each_rowObject

If given a block, calls it once for each top level row, passing it an array containing the items in the row. If the number of columns varies from row to row, the arrays corresponding to the ones with less items will have nil instead of the missing items.

If a block isn’t given, returns an Enumerator which does the same as above.



487
488
489
490
491
492
493
494
495
496
# File 'lib/ruber/qt_sugar.rb', line 487

def each_row
  if block_given?
    rowCount.times do |r|
      a = [] 
      columnCount.times{|c| a << item(r, c)}
      yield a
    end
  else self.to_enum(:each_row)
  end
end