本文整理汇总了Python中PySide.QtCore.QCoreApplication.setApplicationVersion方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.setApplicationVersion方法的具体用法?Python QCoreApplication.setApplicationVersion怎么用?Python QCoreApplication.setApplicationVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore.QCoreApplication
的用法示例。
在下文中一共展示了QCoreApplication.setApplicationVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationVersion [as 别名]
def __init__(self):
assert self._instance == None
Config._instance = self
QCoreApplication.setOrganizationName("nicolas.carrier")
QCoreApplication.setApplicationVersion(version)
QCoreApplication.setApplicationName("gem")
self.__settings = QSettings()
示例2: show_and_raise
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationVersion [as 别名]
val_str = self.convert_val_to_str(setting.value)
setting_field.setText(setting.filter_name(val_str))
if setting.type == 'check':
setting_field.setChecked(setting.value)
if setting.type == 'list':
val_str = self.convert_val_to_str(setting.value)
index = setting_field.findText(val_str)
if index != -1:
setting_field.setCurrentIndex(index)
if setting.type == 'range':
setting_field.setValue(setting.value)
self.ex_button.setEnabled(self.required_settings_filled())
def show_and_raise(self):
self.show()
self.raise_()
if __name__ == '__main__':
app = QApplication(sys.argv)
QCoreApplication.setApplicationName("Web2Executable")
QCoreApplication.setApplicationVersion(__gui_version__)
QCoreApplication.setOrganizationName("SimplyPixelated")
QCoreApplication.setOrganizationDomain("simplypixelated.com")
frame = MainWindow(1000, 500)
frame.show_and_raise()
sys.exit(app.exec_())
示例3: main
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationVersion [as 别名]
import locale
import sys
from PySide import QtGui
from PySide.QtCore import QSettings, QLocale, QCoreApplication
import inselect
from inselect.lib.utils import debug_print
from inselect.gui.main_window import MainWindow
# Values used by several important parts of Qt's machinery including the GUI
# and QSettings.
QCoreApplication.setOrganizationName('NHM')
QCoreApplication.setApplicationName('Inselect')
QCoreApplication.setApplicationVersion(inselect.__version__)
QCoreApplication.setOrganizationDomain('nhm.ac.uk')
def main(args):
parser = argparse.ArgumentParser(description='Runs the inselect user-interface')
parser.add_argument("file", help='The inselect document to open', nargs='?')
parser.add_argument('-d', '--debug', action='store_true',
help='Show debug messages')
parser.add_argument('-l', '--locale', action='store',
help='Use LOCALE; intended for testing purposes only')
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + inselect.__version__)
parsed = parser.parse_args(args[1:])
# TODO LH A command-line switch to clear all QSettings
示例4: main
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationVersion [as 别名]
import argparse
import sys
from PySide.QtGui import QApplication
from PySide.QtCore import QCoreApplication
import syrup
from syrup.main_window import MainWindow
# The QSettings default constructor uses the application's organizationName
# and applicationName properties.
QCoreApplication.setOrganizationName('NHM')
QCoreApplication.setApplicationName('syrup')
# No obvious benefit to also setting these but neither is there any obvious harm
QCoreApplication.setApplicationVersion(syrup.__version__)
QCoreApplication.setOrganizationDomain('nhm.ac.uk')
def main(args):
parser = argparse.ArgumentParser(description=syrup.__doc__)
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + syrup.__version__)
parsed = parser.parse_args(args[1:])
app = QApplication(args)
window = MainWindow(app)
window.show_from_geometry_settings()
sys.exit(app.exec_())