def setBrowerPath(self): 
        download_path = QtWidgets.QFileDialog.getExistingDirectory(self,  
                                    "浏览",  
                                    "E:\workspace")   
        self.lineEdit.setText(download_path)  

PYQT5实现文件目录浏览

点击button “浏览”可以打开对应的文件目录,并将选定的文件目录写入 lineEdit文本框内。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2021-11-28
  • 2022-12-23
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-16
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
相关资源
相似解决方案