mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 10:08:40 -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
|
# append current image to list
|
||||||
self.imagelist.append(
|
self.imagelist.append(
|
||||||
(name, oldfilesizestr, newfilesizestr, ratiostr, filename))
|
(name, oldfilesizestr, newfilesizestr, ratiostr, filename, QIcon(filename)))
|
||||||
self.update_table()
|
self.update_table()
|
||||||
|
|
||||||
if self.showapp != True:
|
if self.showapp != True:
|
||||||
|
|
@ -224,7 +224,7 @@ class TriTableModel(QAbstractTableModel):
|
||||||
return QVariant(data)
|
return QVariant(data)
|
||||||
elif index.column()==0 and role == Qt.DecorationRole:
|
elif index.column()==0 and role == Qt.DecorationRole:
|
||||||
# decorate column 0 with an icon of the image itself
|
# 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)
|
return QVariant(f_icon)
|
||||||
else:
|
else:
|
||||||
return QVariant()
|
return QVariant()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue