Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, directory, unpacker=None, root=None, **kwargs):
super(FilesManager, self).__init__(**kwargs)
self.directory = directory
self.unpacker = unpacker
self.root = root
layout = QtWidgets.QHBoxLayout()
self.files_widget = QtWidgets.QListWidget(
selectionMode=QtWidgets.QListWidget.SingleSelection)
self.files_widget.itemSelectionChanged.connect(self._file_changed)
layout.addWidget(self.files_widget)
right_layout = QtWidgets.QGridLayout()
right_layout.addWidget(QtWidgets.QLabel("name:"), 0, 0)
self.f_name = QtWidgets.QLineEdit('', readOnly=True)
right_layout.addWidget(self.f_name, 0, 1)
right_layout.addWidget(QtWidgets.QLabel("Path:"), 1, 0)
def _open_files_manager(self):
manager = FilesManager(
parent=self,
directory=self.directory_widget.text(),
unpacker=self.unpacker,
root=ROOT.INDEX_TO_OPTION[self.root.currentIndex()])
manager.exec_()