File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,6 @@ def mousePressEvent(self, event):
76
76
self .parent .set_large_image (self .index )
77
77
78
78
79
- class ListWidget (QtWidgets .QListWidget ):
80
- """
81
- The list of files on the left-hand side
82
- """
83
- def __init__ (self , parent ):
84
- super ().__init__ ()
85
- self .parent = parent
86
- self .currentRowChanged .connect (self .change_row )
87
-
88
- def change_row (self , i ):
89
- self .parent .set_entry (i )
90
-
91
-
92
79
class EventFilter (QtCore .QObject ):
93
80
# A hack keypresses can be handled globally and aren't swallowed
94
81
# by the individual widgets
@@ -119,10 +106,12 @@ def __init__(self, entries):
119
106
event_filter = EventFilter (self )
120
107
self .installEventFilter (event_filter )
121
108
122
- self .filelist = ListWidget (self )
109
+ # The list of files on the left-hand side.
110
+ self .filelist = QtWidgets .QListWidget ()
123
111
self .filelist .setMinimumWidth (400 )
124
112
for entry in entries :
125
113
self .filelist .addItem (entry .display )
114
+ self .filelist .currentRowChanged .connect (self .set_entry )
126
115
127
116
thumbnails_box = QtWidgets .QWidget ()
128
117
thumbnails_layout = QtWidgets .QVBoxLayout ()
You can’t perform that action at this time.
0 commit comments