本文整理汇总了Python中PyQt5.QtGui.QGuiApplication.setApplicationName方法的典型用法代码示例。如果您正苦于以下问题:Python QGuiApplication.setApplicationName方法的具体用法?Python QGuiApplication.setApplicationName怎么用?Python QGuiApplication.setApplicationName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtGui.QGuiApplication
的用法示例。
在下文中一共展示了QGuiApplication.setApplicationName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from PyQt5.QtGui import QGuiApplication [as 别名]
# 或者: from PyQt5.QtGui.QGuiApplication import setApplicationName [as 别名]
def main(argv):
a = QGuiApplication(argv)
a.setOrganizationDomain("mapeditor.org")
a.setApplicationName("TmxRasterizer")
a.setApplicationVersion("1.0")
options = CommandLineOptions()
parseCommandLineArguments(options)
if (options.showVersion):
showVersion()
return 0
if (options.showHelp or options.fileToOpen=='' or options.fileToSave==''):
showHelp()
return 0
if (options.scale <= 0.0 and options.tileSize <= 0):
showHelp()
return 0
w = TmxRasterizer()
w.setAntiAliasing(options.useAntiAliasing)
w.setIgnoreVisibility(options.ignoreVisibility)
w.setLayersToHide(options.layersToHide)
if (options.tileSize > 0):
w.setTileSize(options.tileSize)
elif (options.scale > 0.0):
w.setScale(options.scale)
return w.render(options.fileToOpen, options.fileToSave)
示例2: run_app
# 需要导入模块: from PyQt5.QtGui import QGuiApplication [as 别名]
# 或者: from PyQt5.QtGui.QGuiApplication import setApplicationName [as 别名]
def run_app():
app = QGuiApplication(sys.argv)
app.setApplicationName("Worship Prototype")
view = QQuickView()
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(QUrl.fromLocalFile(os.path.join(os.path.dirname(__file__), 'main.qml')))
view.show()
root = view.rootObject()
preview = DefaultScreen()
preview.wire_to_gui(root, 'previewScreen')
preview.show_background(VideoBackground(os.path.join(os.path.dirname(__file__), '../echo.mp4')))
# preview_live = DefaultScreen()
# live = DefaultScreen()
modules = [
LyricsModule(SongsList(), root, preview),
]
sys.exit(app.exec_())
示例3: main
# 需要导入模块: from PyQt5.QtGui import QGuiApplication [as 别名]
# 或者: from PyQt5.QtGui.QGuiApplication import setApplicationName [as 别名]
def main():
app = QGuiApplication(sys.argv)
app.setApplicationName('InfiniteCopy')
openDataBase()
view = QQuickView()
clipboardItemModel = ClipboardItemModel()
clipboardItemModel.create()
filterProxyModel = QSortFilterProxyModel()
filterProxyModel.setSourceModel(clipboardItemModel)
clipboard = Clipboard()
clipboard.setFormats([
mimeText,
mimeHtml,
mimePng,
mimeSvg
])
clipboard.changed.connect(clipboardItemModel.addItem)
engine = view.engine()
imageProvider = ClipboardItemModelImageProvider(clipboardItemModel)
engine.addImageProvider("items", imageProvider)
context = view.rootContext()
context.setContextProperty('clipboardItemModel', clipboardItemModel)
context.setContextProperty('clipboardItemModelFilterProxy', filterProxyModel)
context.setContextProperty('clipboard', clipboard)
view.setSource(QUrl.fromLocalFile('qml/MainWindow.qml'))
view.setGeometry(100, 100, 400, 240)
view.show()
engine.quit.connect(QGuiApplication.quit)
return app.exec_()
示例4: QGuiApplication
# 需要导入模块: from PyQt5.QtGui import QGuiApplication [as 别名]
# 或者: from PyQt5.QtGui.QGuiApplication import setApplicationName [as 别名]
import os
import sys
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView
if __name__ == '__main__':
app = QGuiApplication(sys.argv)
app.setApplicationName("Hello World")
view = QQuickView()
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(os.path.join(os.path.dirname(__file__), 'hello.qml'))
)
view.show()
sys.exit(app.exec_())