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


Python KPushButton.setCheckable方法代码示例

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


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

示例1: Ui_Form

# 需要导入模块: from PyKDE4.kdeui import KPushButton [as 别名]
# 或者: from PyKDE4.kdeui.KPushButton import setCheckable [as 别名]
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(400, 300)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.modsLabel = QtGui.QLabel(Form)
        self.modsLabel.setObjectName(_fromUtf8("modsLabel"))
        self.verticalLayout.addWidget(self.modsLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, -1, -1, 10)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.controlButton = KPushButton(Form)
        self.controlButton.setCheckable(True)
        self.controlButton.setChecked(False)
        self.controlButton.setObjectName(_fromUtf8("controlButton"))
        self.horizontalLayout.addWidget(self.controlButton)
        self.altButton = KPushButton(Form)
        self.altButton.setCheckable(True)
        self.altButton.setChecked(False)
        self.altButton.setObjectName(_fromUtf8("altButton"))
        self.horizontalLayout.addWidget(self.altButton)
        self.shiftButton = KPushButton(Form)
        self.shiftButton.setCheckable(True)
        self.shiftButton.setChecked(False)
        self.shiftButton.setObjectName(_fromUtf8("shiftButton"))
        self.horizontalLayout.addWidget(self.shiftButton)
        self.superButton = KPushButton(Form)
        self.superButton.setCheckable(True)
        self.superButton.setChecked(False)
        self.superButton.setObjectName(_fromUtf8("superButton"))
        self.horizontalLayout.addWidget(self.superButton)
        self.hyperButton = KPushButton(Form)
        self.hyperButton.setCheckable(True)
        self.hyperButton.setChecked(False)
        self.hyperButton.setObjectName(_fromUtf8("hyperButton"))
        self.horizontalLayout.addWidget(self.hyperButton)
        self.metaButton = KPushButton(Form)
        self.metaButton.setCheckable(True)
        self.metaButton.setChecked(False)
        self.metaButton.setObjectName(_fromUtf8("metaButton"))
        self.horizontalLayout.addWidget(self.metaButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(-1, -1, -1, 5)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.keyLabel = QtGui.QLabel(Form)
        self.keyLabel.setObjectName(_fromUtf8("keyLabel"))
        self.horizontalLayout_2.addWidget(self.keyLabel)
        self.setButton = QtGui.QPushButton(Form)
        self.setButton.setObjectName(_fromUtf8("setButton"))
        self.horizontalLayout_2.addWidget(self.setButton)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.kseparator = KSeparator(Form)
        self.kseparator.setObjectName(_fromUtf8("kseparator"))
        self.verticalLayout.addWidget(self.kseparator)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(kdecore.i18n(_fromUtf8("Form")))
        self.modsLabel.setText(kdecore.i18n(_fromUtf8("Modifiers:")))
        self.controlButton.setText(kdecore.i18n(_fromUtf8("Control")))
        self.altButton.setText(kdecore.i18n(_fromUtf8("Alt")))
        self.shiftButton.setText(kdecore.i18n(_fromUtf8("Shift")))
        self.superButton.setText(kdecore.i18n(_fromUtf8("Super")))
        self.hyperButton.setText(kdecore.i18n(_fromUtf8("Hyper")))
        self.metaButton.setText(kdecore.i18n(_fromUtf8("Meta")))
        self.keyLabel.setText(kdecore.i18n(_fromUtf8("Key: %s")))
        self.setButton.setText(kdecore.i18n(_fromUtf8("Press to set")))
开发者ID:BjornW,项目名称:autokey,代码行数:73,代码来源:hotkeysettings.py


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