code: def setup_view(self):
          
          self.install_model()
          self.fsmodel.directoryLoaded.connect(
              lambda: self.resizeColumnToContents(0))
          self.setAnimated(False)
          self.setSortingEnabled(True)
          self.sortByColumn(0, Qt.AscendingOrder)
          self.fsmodel.modelReset.connect(self.reset_icon_provider)
          self.reset_icon_provider()
          # Disable the view of .spyproject. 
          self.filter_directories()
docs: Setup view