本文整理匯總了Python中AnyQt.QtCore.QSettings.setDefaultFormat方法的典型用法代碼示例。如果您正苦於以下問題:Python QSettings.setDefaultFormat方法的具體用法?Python QSettings.setDefaultFormat怎麽用?Python QSettings.setDefaultFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AnyQt.QtCore.QSettings
的用法示例。
在下文中一共展示了QSettings.setDefaultFormat方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init
# 需要導入模塊: from AnyQt.QtCore import QSettings [as 別名]
# 或者: from AnyQt.QtCore.QSettings import setDefaultFormat [as 別名]
def init(self):
"""
Initialize the QCoreApplication.organizationDomain, applicationName,
applicationVersion and the default settings format.
Should only be run once at application startup.
"""
QCoreApplication.setOrganizationDomain(self.OrganizationDomain)
QCoreApplication.setApplicationName(self.ApplicationName)
QCoreApplication.setApplicationVersion(self.ApplicationVersion)
QSettings.setDefaultFormat(QSettings.IniFormat)
示例2: init
# 需要導入模塊: from AnyQt.QtCore import QSettings [as 別名]
# 或者: from AnyQt.QtCore.QSettings import setDefaultFormat [as 別名]
def init():
"""
Initialize the QCoreApplication.organizationDomain, applicationName,
applicationVersion and the default settings format. Will only run once.
.. note:: This should not be run before QApplication has been initialized.
Otherwise it can break Qt's plugin search paths.
"""
dist = pkg_resources.get_distribution("Orange3")
version = dist.version
# Use only major.minor
version = ".".join(version.split(".", 2)[:2])
QCoreApplication.setOrganizationDomain("biolab.si")
QCoreApplication.setApplicationName("Orange Canvas")
QCoreApplication.setApplicationVersion(version)
QSettings.setDefaultFormat(QSettings.IniFormat)
# Make it a null op.
global init
init = lambda: None