Skip to content

Commit

Permalink
remove the dummy argument from the lambda function
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Sep 17, 2019
1 parent c70f9d6 commit e25fcdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions msl/examples/qt/show_standard_icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def add_qt_tab(self, label, icons):
button = QtWidgets.QPushButton(i)
ico = io.get_icon(getattr(QtWidgets.QStyle, i))
button.setIcon(ico)
button.clicked.connect(lambda dummy, ic=ico, n=i: self.zoom(dummy, ic, n))
button.clicked.connect(lambda *args, ic=ico, n=i: self.zoom(ic, n))

layout.addWidget(button, count // num_cols, count % num_cols)
count += 1
Expand Down Expand Up @@ -132,7 +132,7 @@ def add_windows_tab(self):
break

button.setIcon(ico)
button.clicked.connect(lambda dummy, ic=ico, n=name: self.zoom(dummy, ic, n))
button.clicked.connect(lambda *args, ic=ico, n=name: self.zoom(ic, n))
layout.addWidget(button, index // num_cols, index % num_cols)
index += 1
self.num_icons += 1
Expand All @@ -151,7 +151,7 @@ def add_windows_tab(self):
def update_message(self, text):
self.main_window.statusBar().showMessage(text)

def zoom(self, dummy, ico, name):
def zoom(self, ico, name):
self.zoom_widget.setWindowTitle(name)
self.zoom_label.setPixmap(ico.pixmap(self.zoom_widget.size()))
self.zoom_widget.setWindowState(QtCore.Qt.WindowActive)
Expand Down

0 comments on commit e25fcdd

Please sign in to comment.