本文整理汇总了Python中PySide2.QtWidgets.QApplication.translate方法的典型用法代码示例。如果您正苦于以下问题:Python QApplication.translate方法的具体用法?Python QApplication.translate怎么用?Python QApplication.translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide2.QtWidgets.QApplication
的用法示例。
在下文中一共展示了QApplication.translate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: about_text
# 需要导入模块: from PySide2.QtWidgets import QApplication [as 别名]
# 或者: from PySide2.QtWidgets.QApplication import translate [as 别名]
def about_text(self):
self._window.label_3 = QLabel()
self._window.label_3.setTextFormat(Qt.RichText)
self._window.label_3.setOpenExternalLinks(True)
self._window.label_3.setLocale(QLocale(QLocale.English,
QLocale.UnitedStates))
self._window.label_3.setScaledContents(True)
self._window.label_3.setWordWrap(True)
text = """
<html>
<head/>
<body>
<p>poliBeePsync is a program written by Davide Olianas,
released under GNU GPLv3+.</p>
<p>Feel free to contact me at <a
href=\"mailto:[email protected]\">[email protected]</a> for
suggestions and bug reports.</p>
<p>More information is available on the
<a href=\"http://www.davideolianas.com/polibeepsync\">
<span style=\" text-decoration: underline; color:#0000ff;\">
official website</span></a>.
</p>
</body>
</html>
"""
self._window.label_3.setText(QApplication.translate("Form", text,
None))
示例2: retranslateUi
# 需要导入模块: from PySide2.QtWidgets import QApplication [as 别名]
# 或者: from PySide2.QtWidgets.QApplication import translate [as 别名]
def retranslateUi(self, Form):
self._window.label_2.setText(QApplication.translate("Form", "Password",
None))
self._window.label.setText(QApplication.translate("Form", "User code",
None))
self._window.trylogin.setText(
QApplication.translate("Form", "Try logging in", None))
self._window.check_version.setText(
QApplication.translate("Form", "Check for new version", None))
self._window.statusbar.showMessage(
QApplication.translate("Form", "Login successful", None))
self._window.label_4.setText(
QApplication.translate("Form", "Root folder", None))
self._window.changeRootFolder.setText(
QApplication.translate("Form", "Change", None))
self._window.label_5.setText(QApplication.translate("Form",
"Sync every",
None))
self._window.label_6.setText(QApplication.translate("Form",
"minutes", None))
self._window.syncNow.setText(QApplication.translate("Form",
"Sync now", None))
self._window.addSyncNewCourses.setText(QApplication.translate("Form",
"Automatically add and sync new available courses",
None))
self._window.tabWidget.setTabText(self._window.tabWidget.indexOf(self._window.settings_tab),
QApplication.translate("Form",
"Settings",
None))
self._window.refreshCourses.setText(
QApplication.translate("Form", "Refresh list", None))
self._window.tabWidget.setTabText(self._window.tabWidget.indexOf(self._window.courses_tab),
QApplication.translate("Form", "Courses",
None))
self._window.about.setText(QApplication.translate("Form", "About", None))
self._window.tabWidget.setTabText(self._window.tabWidget.indexOf(self._window.status_tab),
QApplication.translate("Form", "Status",
None))
self._window.tabWidget.setTabText(self._window.tabWidget.indexOf(self._window.plugins_tab),
QApplication.translate("Form", "Plugins",
None))
示例3: set_server_status
# 需要导入模块: from PySide2.QtWidgets import QApplication [as 别名]
# 或者: from PySide2.QtWidgets.QApplication import translate [as 别名]
def set_server_status(self, text, number):
self.ui.label_server_status.setText(
QApplication.translate("main_window", text, None)
+ "({0:d})".format(number))