Esempio n. 1
0
def calc_row_height(view, model_row):
    row_height = 0
    for column in view.tableColumns():
        cell = column.dataCell()
        value_dict = tablemodel.get_column_data(model_row, column)
        cell.setObjectValue_(value_dict)
        cell_height = cell.calcHeight_(view)
        row_height = max(row_height, cell_height)
    if row_height == 0:
        row_height = 12
    return row_height
Esempio n. 2
0
 def set_cell_data(self):
     row = self.tableview.dataSource().model[self.iter]
     value_dict = tablemodel.get_column_data(row, self.table_column)
     self.cell.setObjectValue_(value_dict)