当前位置: 首页>>代码示例>>Python>>正文


Python QGuiApplication.setApplicationName方法代码示例

本文整理汇总了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)
开发者ID:theall,项目名称:Python-Tiled,代码行数:32,代码来源:main.py

示例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_())
开发者ID:fadawar,项目名称:worship-prototype,代码行数:22,代码来源:__init__.py

示例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_()
开发者ID:hluk,项目名称:infinitecopy,代码行数:42,代码来源:infinitecopy.py

示例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_())
开发者ID:fadawar,项目名称:docker-pyqt5-qml-qtmultimedia,代码行数:21,代码来源:hello.py


注:本文中的PyQt5.QtGui.QGuiApplication.setApplicationName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。