本文整理汇总了Python中PyQt4.Qt.QSettings.beginGroup方法的典型用法代码示例。如果您正苦于以下问题:Python QSettings.beginGroup方法的具体用法?Python QSettings.beginGroup怎么用?Python QSettings.beginGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QSettings
的用法示例。
在下文中一共展示了QSettings.beginGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __set_backup_path
# 需要导入模块: from PyQt4.Qt import QSettings [as 别名]
# 或者: from PyQt4.Qt.QSettings import beginGroup [as 别名]
def __set_backup_path(self):
settings = QSettings("GCI", "vertex-tools")
settings.beginGroup("BackupSettings")
default_path = QDir.tempPath()
backup_path = settings.value("backup_path", default_path)
self.backup_folder_edit.setText(backup_path)
settings.endGroup()
示例2: on_backup_folder_button_clicked
# 需要导入模块: from PyQt4.Qt import QSettings [as 别名]
# 或者: from PyQt4.Qt.QSettings import beginGroup [as 别名]
def on_backup_folder_button_clicked(self):
backup_path = self.backup_folder_edit.text()
if len(backup_path) == 0:
backup_path = QDir.tempPath()
backup_path = QFileDialog.getExistingDirectory(self, self.tr("Select Backup Folder"), backup_path,
QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks)
if len(backup_path) == 0:
return
self.backup_folder_edit.setText(backup_path)
settings = QSettings("GCI", "vertex-tools")
settings.beginGroup("BackupSettings")
settings.setValue("backup_path", backup_path)
settings.endGroup()