本文整理汇总了Python中PyKDE4.kdeui.KPushButton.setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:Python KPushButton.setWhatsThis方法的具体用法?Python KPushButton.setWhatsThis怎么用?Python KPushButton.setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyKDE4.kdeui.KPushButton
的用法示例。
在下文中一共展示了KPushButton.setWhatsThis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_Form
# 需要导入模块: from PyKDE4.kdeui import KPushButton [as 别名]
# 或者: from PyKDE4.kdeui.KPushButton import setWhatsThis [as 别名]
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(508, 94)
self.verticalLayout = QtGui.QVBoxLayout(Form)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.dictionaryCombo = QtGui.QComboBox(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.dictionaryCombo.sizePolicy().hasHeightForWidth())
self.dictionaryCombo.setSizePolicy(sizePolicy)
self.dictionaryCombo.setObjectName("dictionaryCombo")
self.horizontalLayout.addWidget(self.dictionaryCombo)
self.checkVersionButton = KPushButton(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.checkVersionButton.sizePolicy().hasHeightForWidth())
self.checkVersionButton.setSizePolicy(sizePolicy)
self.checkVersionButton.setObjectName("checkVersionButton")
self.horizontalLayout.addWidget(self.checkVersionButton)
self.removeButton = KPushButton(Form)
self.removeButton.setObjectName("removeButton")
self.horizontalLayout.addWidget(self.removeButton)
self.installButton = KPushButton(Form)
self.installButton.setEnabled(False)
self.installButton.setObjectName("installButton")
self.horizontalLayout.addWidget(self.installButton)
self.verticalLayout.addLayout(self.horizontalLayout)
self.statusLabel = KSqueezedTextLabel(Form)
self.statusLabel.setObjectName("statusLabel")
self.verticalLayout.addWidget(self.statusLabel)
self.progressBar = QtGui.QProgressBar(Form)
self.progressBar.setProperty("value", QtCore.QVariant(24))
self.progressBar.setInvertedAppearance(False)
self.progressBar.setObjectName("progressBar")
self.verticalLayout.addWidget(self.progressBar)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(kdecore.i18n("Form"))
self.checkVersionButton.setToolTip(kdecore.i18n("Check the online resource for a newer version."))
self.checkVersionButton.setWhatsThis(kdecore.i18n("Check the online resource for a newer version."))
self.checkVersionButton.setText(kdecore.i18n("&Check for newer"))
self.removeButton.setText(kdecore.i18n("&Remove"))
self.installButton.setToolTip(kdecore.i18n("Download and install the selected dictionary."))
self.installButton.setWhatsThis(kdecore.i18n("Download and install the selected dictionary."))
self.installButton.setText(kdecore.i18n("&Install"))
示例2: PointAndClick
# 需要导入模块: from PyKDE4.kdeui import KPushButton [as 别名]
# 或者: from PyKDE4.kdeui.KPushButton import setWhatsThis [as 别名]
class PointAndClick(SettingsGroup):
def __init__(self, page):
super(PointAndClick, self).__init__(i18n("Point and Click"), page)
layout = QHBoxLayout(self)
self.button = KPushButton(i18n("Enable Point and Click"))
self.button.setFixedSize(self.button.sizeHint())
l = QLabel(
i18n(
"Click this button if Point and Click does not work. "
"See Shift+F1 (What's This) for more information."
)
)
l.setWordWrap(True)
l.setWhatsThis(
i18n(
"On its first run, Frescobaldi tries to auto-configure Okular "
"(which provides the PDF preview) to call Frescobaldi when a "
"clickable object is clicked."
"\n\n"
"But this setting can get lost when you move Frescobaldi to a "
"different location or when other applications reconfigure Okular."
"\n\n"
"Click this button to configure Frescobaldi as 'custom editor' "
"inside Okular. This works best when all instances of Okular are "
"closed and the PDF preview has not yet been opened."
)
)
self.button.setWhatsThis(l.whatsThis())
self.button.clicked.connect(self.installOkularPartRC)
layout.addWidget(self.button)
layout.addWidget(l)
def installOkularPartRC(self):
import frescobaldi_app.install
frescobaldi_app.install.installOkularPartRC()
config("").writeEntry("configure okularpart", True)
KMessageBox.information(
self,
i18n(
"The Okular PDF preview has been reconfigured.\n\n"
"If you already opened the PDF preview, "
"restart Frescobaldi for the new settings to take effect."
),
)