當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。