本文整理汇总了Python中PyKDE4.kdeui.KPushButton.setSizePolicy方法的典型用法代码示例。如果您正苦于以下问题:Python KPushButton.setSizePolicy方法的具体用法?Python KPushButton.setSizePolicy怎么用?Python KPushButton.setSizePolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyKDE4.kdeui.KPushButton
的用法示例。
在下文中一共展示了KPushButton.setSizePolicy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_Form
# 需要导入模块: from PyKDE4.kdeui import KPushButton [as 别名]
# 或者: from PyKDE4.kdeui.KPushButton import setSizePolicy [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: Ui_FetchDialog
# 需要导入模块: from PyKDE4.kdeui import KPushButton [as 别名]
# 或者: from PyKDE4.kdeui.KPushButton import setSizePolicy [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")))
#.........这里部分代码省略.........