本文整理汇总了Python中PyQt4.Qt.QCoreApplication.setOrganizationName方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.setOrganizationName方法的具体用法?Python QCoreApplication.setOrganizationName怎么用?Python QCoreApplication.setOrganizationName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QCoreApplication
的用法示例。
在下文中一共展示了QCoreApplication.setOrganizationName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init_qt
# 需要导入模块: from PyQt4.Qt import QCoreApplication [as 别名]
# 或者: from PyQt4.Qt.QCoreApplication import setOrganizationName [as 别名]
def init_qt(args):
from calibre.gui2.ui import Main
parser = option_parser()
opts, args = parser.parse_args(args)
if opts.with_library is not None:
if not os.path.exists(opts.with_library):
os.makedirs(opts.with_library)
if os.path.isdir(opts.with_library):
prefs.set('library_path', os.path.abspath(opts.with_library))
prints('Using library at', prefs['library_path'])
QCoreApplication.setOrganizationName(ORG_NAME)
QCoreApplication.setApplicationName(APP_UID)
override = 'calibre-gui' if islinux else None
app = Application(args, override_program_name=override)
actions = tuple(Main.create_application_menubar())
app.setWindowIcon(QIcon(I('lt.png')))
return app, opts, args, actions
示例2: init_qt
# 需要导入模块: from PyQt4.Qt import QCoreApplication [as 别名]
# 或者: from PyQt4.Qt.QCoreApplication import setOrganizationName [as 别名]
def init_qt(args):
parser = option_parser()
opts, args = parser.parse_args(args)
find_portable_library()
if opts.with_library is not None:
libpath = os.path.expanduser(opts.with_library)
if not os.path.exists(libpath):
os.makedirs(libpath)
if os.path.isdir(libpath):
prefs.set('library_path', os.path.abspath(libpath))
prints('Using library at', prefs['library_path'])
QCoreApplication.setOrganizationName(ORG_NAME)
QCoreApplication.setApplicationName(APP_UID)
override = 'calibre-gui' if islinux else None
app = Application(args, override_program_name=override)
app.file_event_hook = EventAccumulator()
app.setWindowIcon(QIcon(I('lt.png')))
return app, opts, args