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


Python QFileDialog.getExistingDirectory方法代码示例

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


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

示例1: changeFolder

# 需要导入模块: from PyQt4.QtGui import QFileDialog [as 别名]
# 或者: from PyQt4.QtGui.QFileDialog import getExistingDirectory [as 别名]
def changeFolder(self):
        folder = QFileDialog.getExistingDirectory(self, "Select Folder", homedir)
        if not folder.isEmpty():
            self.folder = folder + "/"
            self.labelFolder.setText(self.folder) 
开发者ID:ksharindam,项目名称:quartz-browser,代码行数:7,代码来源:main.py

示例2: GetOutputFolderName

# 需要导入模块: from PyQt4.QtGui import QFileDialog [as 别名]
# 或者: from PyQt4.QtGui.QFileDialog import getExistingDirectory [as 别名]
def GetOutputFolderName(base_path=None, message='Select a folder:'):
    if base_path is None:
        base_path = tempfile.gettempdir()
    dir = QFileDialog.getExistingDirectory(None, message, base_path, QFileDialog.ShowDirsOnly)
    return dir 
开发者ID:AequilibraE,项目名称:AequilibraE,代码行数:7,代码来源:get_output_file_name.py

示例3: select_cache_dir

# 需要导入模块: from PyQt4.QtGui import QFileDialog [as 别名]
# 或者: from PyQt4.QtGui.QFileDialog import getExistingDirectory [as 别名]
def select_cache_dir(self):
        cache_dir = QFileDialog.getExistingDirectory(
            self.main_win,
            self.settings.DLG_CAPTION,
            self.settings.cache_dir,
            QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks
        )
        if '' == cache_dir:
            self.util.msg_log('no cachedir selected')
        else:
            self.IDC_leCacheDir.setText(cache_dir) 
开发者ID:BergWerkGIS,项目名称:QGIS-CKAN-Browser,代码行数:13,代码来源:ckan_browser_dialog_settings.py

示例4: getExistingDirectory

# 需要导入模块: from PyQt4.QtGui import QFileDialog [as 别名]
# 或者: from PyQt4.QtGui.QFileDialog import getExistingDirectory [as 别名]
def getExistingDirectory():
        """
        Open a filedialog where you must choose a directory
        :return: The selected directory
        """
        return str(QFileDialog.getExistingDirectory(None, "Select Directory")) 
开发者ID:DaniLabs,项目名称:rexploit,代码行数:8,代码来源:filedialog.py

示例5: open_browse

# 需要导入模块: from PyQt4.QtGui import QFileDialog [as 别名]
# 或者: from PyQt4.QtGui.QFileDialog import getExistingDirectory [as 别名]
def open_browse(self):
        fname = QFileDialog.getExistingDirectory(self.dlg, "Select Directory")
        self.dlg.lineEdit_6.setText(fname)

    # noinspection PyMethodMayBeStatic 
开发者ID:bopen,项目名称:qgis-elevation-plugin,代码行数:7,代码来源:qgis_elevation_plugin.py


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