mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 01:58:41 -05:00
init the QIcon before the table is drawn
This commit is contained in:
parent
17354a5085
commit
96c8442dd0
1 changed files with 2 additions and 2 deletions
|
|
@ -154,7 +154,7 @@ class StartQT4(QMainWindow):
|
|||
|
||||
# append current image to list
|
||||
self.imagelist.append(
|
||||
(name, oldfilesizestr, newfilesizestr, ratiostr, filename))
|
||||
(name, oldfilesizestr, newfilesizestr, ratiostr, filename, QIcon(filename)))
|
||||
self.update_table()
|
||||
|
||||
if self.showapp != True:
|
||||
|
|
@ -224,7 +224,7 @@ class TriTableModel(QAbstractTableModel):
|
|||
return QVariant(data)
|
||||
elif index.column()==0 and role == Qt.DecorationRole:
|
||||
# decorate column 0 with an icon of the image itself
|
||||
f_icon = QIcon( self.imagelist[index.row()][4] )
|
||||
f_icon = self.imagelist[index.row()][5]
|
||||
return QVariant(f_icon)
|
||||
else:
|
||||
return QVariant()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue