am having a QTableView and trying to get all values in the column. Am able to retrieve the values using the code below
data= []
for row in range(model.rowCount()):
data.append([])
for column in range(model.columnCount()):
index = model.index(row, 0)
data[row].append(str(model.data(index)))
for item in data:
names = '{}'.format(item[0])
print(names)
The problem am facing is that am getting the values as bytes for example
b'Austria'
b'Belgium'
b'Denmark'
b'England'
b'Finland'
instead of
Austria
Belgium
Denmark
England
Finland