From c493759ae8c1e6d8b41fe25f1139c5cf8b531e72 Mon Sep 17 00:00:00 2001 From: shmu1i <159483565+shmu1i@users.noreply.github.com> Date: Fri, 9 Feb 2024 09:43:31 -0500 Subject: [PATCH] Add a QLabel to display the count of APK's found --- apk_package_viewer.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apk_package_viewer.py b/apk_package_viewer.py index 29db58f..e5bfbca 100644 --- a/apk_package_viewer.py +++ b/apk_package_viewer.py @@ -4,6 +4,7 @@ QPushButton, QFileDialog, QProgressBar, QMenu, QAction, QHBoxLayout, QLabel, QLineEdit, QComboBox ) from PyQt5.QtCore import QSettings, Qt, QTimer +from PyQt5.QtGui import QFont from androguard import util from androguard.core.apk import get_apkid import os @@ -42,14 +43,17 @@ def load_files_progress(folder_path, progress_bar): total_files = len(package_dict) progress_bar.setMaximum(total_files) progress_bar.setValue(0) - + + count_label.setText(f"APK's Found: 0") # Reset count label + item = tree.invisibleRootItem() for index, (filepath, packagename) in enumerate(package_dict.items(), 1): filename = os.path.basename(filepath) child_item = QTreeWidgetItem([filename, packagename, filepath]) item.addChild(child_item) - + progress_bar.setValue(index) + count_label.setText(f"APK's Found: {index}") # Update count label QApplication.processEvents() progress_bar.setValue(total_files) @@ -181,6 +185,8 @@ def open_file(item): # Connect the custom context menu function to the customContextMenu signal tree.customContextMenuRequested.connect(show_context_menu) + + search_layout = QHBoxLayout() search_label = QLabel("Search:") search_layout.addWidget(search_label) @@ -248,6 +254,11 @@ def search_files(): layout.addWidget(progress_bar) window.show() +count_label = QLabel("APK's Found: 0") +font = QFont() +font.setBold(True) +layout.addWidget(count_label) + tree.itemDoubleClicked.connect(on_item_double_click) sys.exit(app.exec_())