當前位置: 首頁>>代碼示例>>Python>>正文


Python KPushButton.setFlat方法代碼示例

本文整理匯總了Python中PyKDE4.kdeui.KPushButton.setFlat方法的典型用法代碼示例。如果您正苦於以下問題:Python KPushButton.setFlat方法的具體用法?Python KPushButton.setFlat怎麽用?Python KPushButton.setFlat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PyKDE4.kdeui.KPushButton的用法示例。


在下文中一共展示了KPushButton.setFlat方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Ui_connectForm

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setFlat [as 別名]
class Ui_connectForm(object):
    def setupUi(self, connectForm):
        connectForm.setObjectName(_fromUtf8("connectForm"))
        connectForm.resize(655, 33)
        connectForm.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(connectForm)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(connectForm)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.urlLabel = QtGui.QLabel(connectForm)
        self.urlLabel.setObjectName(_fromUtf8("urlLabel"))
        self.horizontalLayout.addWidget(self.urlLabel)
        self.danbooruUrlComboBox = KComboBox(connectForm)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.danbooruUrlComboBox.sizePolicy().hasHeightForWidth())
        self.danbooruUrlComboBox.setSizePolicy(sizePolicy)
        self.danbooruUrlComboBox.setEditable(False)
        self.danbooruUrlComboBox.setObjectName(_fromUtf8("danbooruUrlComboBox"))
        self.horizontalLayout.addWidget(self.danbooruUrlComboBox)
        self.userLabel = QtGui.QLabel(connectForm)
        self.userLabel.setObjectName(_fromUtf8("userLabel"))
        self.horizontalLayout.addWidget(self.userLabel)
        self.userLineEdit = KLineEdit(connectForm)
        self.userLineEdit.setObjectName(_fromUtf8("userLineEdit"))
        self.horizontalLayout.addWidget(self.userLineEdit)
        self.passwordLabel = QtGui.QLabel(connectForm)
        self.passwordLabel.setObjectName(_fromUtf8("passwordLabel"))
        self.horizontalLayout.addWidget(self.passwordLabel)
        self.passwdLineEdit = KLineEdit(connectForm)
        self.passwdLineEdit.setPasswordMode(True)
        self.passwdLineEdit.setObjectName(_fromUtf8("passwdLineEdit"))
        self.horizontalLayout.addWidget(self.passwdLineEdit)
        self.buttonBox = KDialogButtonBox(connectForm)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.horizontalLayout.addWidget(self.buttonBox)

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

    def retranslateUi(self, connectForm):
        self.urlLabel.setText(kdecore.i18n(_fromUtf8("Danbooru URL")))
        self.userLabel.setText(kdecore.i18n(_fromUtf8("Username")))
        self.userLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Danbooru username (optional)")))
        self.passwordLabel.setText(kdecore.i18n(_fromUtf8("Password")))
        self.passwdLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Danbooru password (optional)")))
開發者ID:lbeltrame,項目名稱:danbooru-client,代碼行數:53,代碼來源:ui_connectwidget.py

示例2: Ui_FetchDialog

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setFlat [as 別名]
class Ui_FetchDialog(object):
    def setupUi(self, FetchDialog):
        FetchDialog.setObjectName(_fromUtf8("FetchDialog"))
        FetchDialog.resize(662, 31)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(FetchDialog.sizePolicy().hasHeightForWidth())
        FetchDialog.setSizePolicy(sizePolicy)
        FetchDialog.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(FetchDialog)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(FetchDialog)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.ratingLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ratingLabel.sizePolicy().hasHeightForWidth())
        self.ratingLabel.setSizePolicy(sizePolicy)
        self.ratingLabel.setObjectName(_fromUtf8("ratingLabel"))
        self.horizontalLayout.addWidget(self.ratingLabel)
        self.ratingComboBox = KComboBox(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ratingComboBox.sizePolicy().hasHeightForWidth())
        self.ratingComboBox.setSizePolicy(sizePolicy)
        self.ratingComboBox.setObjectName(_fromUtf8("ratingComboBox"))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.ratingComboBox)
        self.postLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.postLabel.sizePolicy().hasHeightForWidth())
        self.postLabel.setSizePolicy(sizePolicy)
        self.postLabel.setObjectName(_fromUtf8("postLabel"))
        self.horizontalLayout.addWidget(self.postLabel)
        self.postSpinBox = KIntSpinBox(FetchDialog)
        self.postSpinBox.setMinimum(1)
        self.postSpinBox.setMaximum(100)
        self.postSpinBox.setObjectName(_fromUtf8("postSpinBox"))
        self.horizontalLayout.addWidget(self.postSpinBox)
        self.tagLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tagLabel.sizePolicy().hasHeightForWidth())
        self.tagLabel.setSizePolicy(sizePolicy)
        self.tagLabel.setObjectName(_fromUtf8("tagLabel"))
        self.horizontalLayout.addWidget(self.tagLabel)
        self.tagLineEdit = KLineEdit(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tagLineEdit.sizePolicy().hasHeightForWidth())
        self.tagLineEdit.setSizePolicy(sizePolicy)
        self.tagLineEdit.setObjectName(_fromUtf8("tagLineEdit"))
        self.horizontalLayout.addWidget(self.tagLineEdit)
        self.downloadButton = KPushButton(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.downloadButton.sizePolicy().hasHeightForWidth())
        self.downloadButton.setSizePolicy(sizePolicy)
        self.downloadButton.setObjectName(_fromUtf8("downloadButton"))
        self.horizontalLayout.addWidget(self.downloadButton)

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

    def retranslateUi(self, FetchDialog):
        self.ratingLabel.setText(kdecore.i18n(_fromUtf8("Maximum rating: ")))
        self.ratingComboBox.setItemText(0, kdecore.i18n(_fromUtf8("Safe")))
        self.ratingComboBox.setItemText(1, kdecore.i18n(_fromUtf8("Questionable")))
        self.ratingComboBox.setItemText(2, kdecore.i18n(_fromUtf8("Explicit")))
        self.postLabel.setText(kdecore.i18n(_fromUtf8("Posts to retrieve:")))
        self.postSpinBox.setToolTip(kdecore.i18n(_fromUtf8("Number of posts to retrieve (max 100)")))
        self.postSpinBox.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "The number of posts to retrieve. Notice that Danbooru limits the maximum number of posts to 100."
                )
            )
        )
        self.tagLabel.setText(kdecore.i18n(_fromUtf8("Tags:")))
        self.tagLineEdit.setToolTip(kdecore.i18n(_fromUtf8("Tags to include in search (optional)")))
        self.tagLineEdit.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "Input here the tags that should be used when looking for posts. Separate them with commas, without spaces."
                )
            )
        )
        self.tagLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Tags, comma separated")))
#.........這裏部分代碼省略.........
開發者ID:lbeltrame,項目名稱:danbooru-client,代碼行數:103,代碼來源:ui_fetchwidget.py


注:本文中的PyKDE4.kdeui.KPushButton.setFlat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。