当前位置: 首页>>代码示例>>Python>>正文


Python QFileDialog.selectedFiles方法代码示例

本文整理汇总了Python中qtpy.QtWidgets.QFileDialog.selectedFiles方法的典型用法代码示例。如果您正苦于以下问题:Python QFileDialog.selectedFiles方法的具体用法?Python QFileDialog.selectedFiles怎么用?Python QFileDialog.selectedFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qtpy.QtWidgets.QFileDialog的用法示例。


在下文中一共展示了QFileDialog.selectedFiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: select_manual_output_folder

# 需要导入模块: from qtpy.QtWidgets import QFileDialog [as 别名]
# 或者: from qtpy.QtWidgets.QFileDialog import selectedFiles [as 别名]
 def select_manual_output_folder(self):
     # _current_folder = self.main_window.current_folder
     dlg = QFileDialog(parent=self.main_window,
                       caption="Select or Define Output Directory")
     dlg.setFileMode(QFileDialog.Directory)
     if dlg.exec_():
         output_folder_name = str(dlg.selectedFiles()[0])
         self.main_window.autonom_ui.manual_output_folder_field.setText(output_folder_name)
开发者ID:neutrons,项目名称:FastGR,代码行数:10,代码来源:step1_gui_handler.py

示例2: openDirDialog

# 需要导入模块: from qtpy.QtWidgets import QFileDialog [as 别名]
# 或者: from qtpy.QtWidgets.QFileDialog import selectedFiles [as 别名]
 def openDirDialog(self):
     dialog = QFileDialog(self)
     dialog.setFileMode(QFileDialog.DirectoryOnly)
     if dialog.exec_():
         directory = dialog.selectedFiles()[0]
         self.openDir(directory)
开发者ID:janpipek,项目名称:boadata,代码行数:8,代码来源:main_window.py


注:本文中的qtpy.QtWidgets.QFileDialog.selectedFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。