本文整理匯總了Python中PyQt4.Qt.QSettings.setDefaultFormat方法的典型用法代碼示例。如果您正苦於以下問題:Python QSettings.setDefaultFormat方法的具體用法?Python QSettings.setDefaultFormat怎麽用?Python QSettings.setDefaultFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt4.Qt.QSettings
的用法示例。
在下文中一共展示了QSettings.setDefaultFormat方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __new__
# 需要導入模塊: from PyQt4.Qt import QSettings [as 別名]
# 或者: from PyQt4.Qt.QSettings import setDefaultFormat [as 別名]
def __new__(cls, clear_cache = False):
if not cls._instance:
cls._instance = super(Settings, cls).__new__(cls)
cls._instance.signals = Settings.signals()
QSettings.setDefaultFormat(QSettings.IniFormat)
log.DEBUG("saving settings in file %s" %(QSettings().fileName()));
cls._instance._settings = QSettings()
cls._defaults = {
Settings.DOTA_PATH_KEY: dota_path_default,
Settings.STEAM_PATH_KEY: steam_path_default,
}
if clear_cache:
cls._instance._cache = {}
return cls._instance
示例2: ConfigProxy
# 需要導入模塊: from PyQt4.Qt import QSettings [as 別名]
# 或者: from PyQt4.Qt.QSettings import setDefaultFormat [as 別名]
# This option is no longer used. It remains for compatibility with upgrades
# so the value can be migrated
c.add_opt('tag_browser_hidden_categories', default=set(),
help=_('tag browser categories not to display'))
c.add_opt
return ConfigProxy(c)
config = _config()
# }}}
QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, config_dir)
QSettings.setPath(QSettings.IniFormat, QSettings.SystemScope,
config_dir)
QSettings.setDefaultFormat(QSettings.IniFormat)
# Turn off DeprecationWarnings in windows GUI
if iswindows:
import warnings
warnings.simplefilter('ignore', DeprecationWarning)
def available_heights():
desktop = QCoreApplication.instance().desktop()
return map(lambda x: x.height(), map(desktop.availableGeometry, range(desktop.numScreens())))
def available_height():
desktop = QCoreApplication.instance().desktop()
return desktop.availableGeometry().height()
def max_available_height():