From 9fcca89b25443894a56110621bb8cc6216d8cd5a Mon Sep 17 00:00:00 2001 From: Michi4 <82534353+Michi4@users.noreply.github.com> Date: Sun, 2 Jul 2023 22:16:26 +0200 Subject: [PATCH] fixed unexpected type 'float' error by parsing to integer --- src/gui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui.py b/src/gui.py index bc126ad..0c7149b 100644 --- a/src/gui.py +++ b/src/gui.py @@ -113,7 +113,7 @@ def download_receive_signal(self, row, link, append_row = True, dl_name = '', pr self.gui.table_model.appendRow(row) index = self.gui.table_model.index(self.gui.table_model.rowCount()-1, 4) progress_bar = QProgressBar() - progress_bar.setValue(progress) + progress_bar.setValue(int(progress) self.gui.table.setIndexWidget(index, progress_bar) row[4] = progress_bar @@ -130,7 +130,7 @@ def update_receive_signal(self, data, items): for i in range(len(items)): if items[i] and isinstance(items[i], str): data[i].setText(items[i]) if items[i] and not isinstance(items[i], str): - data[i].setValue(items[i]) + data[i].setValue(int(items[i])) def set_dl_directory(self): file_dialog = QFileDialog() @@ -282,4 +282,4 @@ def settings_win(self): self.add_links.setMinimumSize(300, 200) widget.setLayout(vbox) - self.settings.setFixedSize(340, 85) \ No newline at end of file + self.settings.setFixedSize(340, 85)