Hide save/download bar on QWebEngine - PyQt6

56 Views Asked by At

I'm working on a PDF viewing tool using PyQt6 and QWebEngine in Python. I want to hide/remove the save and download buttons that appear when QWebEngine is running. Is this possible?

ss

Code I am currently using is as follows;

def preview(self):
    file_paths = [self.files_listbox.item(i).text() for i in range(self.files_listbox.count())]
    if not file_paths:
        QMessageBox.warning(self, 'Warning', 'Please select a proper PDF document.')
        return

    selected_item = self.files_listbox.currentItem()
    if selected_item:
        self.preview_view.setHtml('')

        file_path = selected_item.text()
        url = QtCore.QUrl.fromLocalFile(file_path)
        self.preview_view.setUrl(url)

        self.clear_preview_frame()
        self.preview_frame.show()
0

There are 0 best solutions below