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


Python QCoreApplication.applicationDirPath方法代码示例

本文整理汇总了Python中PySide.QtCore.QCoreApplication.applicationDirPath方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.applicationDirPath方法的具体用法?Python QCoreApplication.applicationDirPath怎么用?Python QCoreApplication.applicationDirPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PySide.QtCore.QCoreApplication的用法示例。


在下文中一共展示了QCoreApplication.applicationDirPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: import

# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import applicationDirPath [as 别名]
# the GNU General Public License for more details.

import os
import platform
import stat
import sys
from PySide.QtCore import (QCoreApplication, QProcess)

__version__ = '1.0.3'

if sys.platform.startswith("win"):
    PATH = os.path.join(os.path.dirname(sys.executable),
                        "Lib/site-packages/PySide/bin")
else:
    app = QCoreApplication([])
    PATH = unicode(app.applicationDirPath())
    del app
PYUIC4 = os.path.join(PATH, "pyside-uic") # e.g. PYUIC4 = "/usr/bin/pyuic4"
PYRCC4 = os.path.join(PATH, "pyside-rcc")
PYLUPDATE4 = os.path.join(PATH, "pyside-lupdate")
LRELEASE = "lrelease"
if platform.system() == "Windows":
    PYUIC4 = PYUIC4.replace("/", "\\") + ".bat"
    PYRCC4 = PYRCC4.replace("/", "\\") + ".exe"
    PYLUPDATE4 = PYLUPDATE4.replace("/", "\\") + ".exe"

msg = []
if not os.access(PYUIC4, os.F_OK):
    msg.append("failed to find pyside-uic; tried %s" % PYUIC4)
if not os.access(PYRCC4, os.F_OK):
    msg.append("failed to find pyside-rcc; tried %s" % PYRCC4)
开发者ID:jlehtoma,项目名称:MaeBird,代码行数:33,代码来源:mkpyside.py


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