本文整理汇总了Python中calibre.gui2.widgets.HistoryLineEdit.setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:Python HistoryLineEdit.setMinimumSize方法的具体用法?Python HistoryLineEdit.setMinimumSize怎么用?Python HistoryLineEdit.setMinimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calibre.gui2.widgets.HistoryLineEdit
的用法示例。
在下文中一共展示了HistoryLineEdit.setMinimumSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_Form
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setMinimumSize [as 别名]
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(430, 74)
Form.setWindowTitle(_("Form"))
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.msg = QtGui.QLabel(Form)
self.msg.setText(_("TextLabel"))
self.msg.setWordWrap(True)
self.msg.setObjectName(_fromUtf8("msg"))
self.verticalLayout.addWidget(self.msg)
self.edit = HistoryLineEdit(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(100)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.edit.sizePolicy().hasHeightForWidth())
self.edit.setSizePolicy(sizePolicy)
self.edit.setMinimumSize(QtCore.QSize(350, 0))
self.edit.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLengthWithIcon)
self.edit.setMinimumContentsLength(30)
self.edit.setObjectName(_fromUtf8("edit"))
self.verticalLayout.addWidget(self.edit)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.button = QtGui.QToolButton(Form)
self.button.setToolTip(_("Use a wizard to help construct the Regular expression"))
self.button.setText(_("..."))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("wizard.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button.setIcon(icon)
self.button.setIconSize(QtCore.QSize(40, 40))
self.button.setObjectName(_fromUtf8("button"))
self.gridLayout.addWidget(self.button, 0, 1, 1, 1)
self.msg.setBuddy(self.edit)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
pass
示例2: Ui_EditAuthorsDialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setMinimumSize [as 别名]
class Ui_EditAuthorsDialog(object):
def setupUi(self, EditAuthorsDialog):
EditAuthorsDialog.setObjectName(_fromUtf8("EditAuthorsDialog"))
EditAuthorsDialog.resize(768, 342)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(EditAuthorsDialog.sizePolicy().hasHeightForWidth())
EditAuthorsDialog.setSizePolicy(sizePolicy)
EditAuthorsDialog.setWindowTitle(_("Manage authors"))
self.verticalLayout = QtGui.QVBoxLayout(EditAuthorsDialog)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.hboxlayout = QtGui.QHBoxLayout()
self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
self.label = QtGui.QLabel(EditAuthorsDialog)
self.label.setText(_("&Search for:"))
self.label.setObjectName(_fromUtf8("label"))
self.hboxlayout.addWidget(self.label)
self.find_box = HistoryLineEdit(EditAuthorsDialog)
self.find_box.setMinimumSize(QtCore.QSize(200, 0))
self.find_box.setObjectName(_fromUtf8("find_box"))
self.hboxlayout.addWidget(self.find_box)
self.find_button = QtGui.QPushButton(EditAuthorsDialog)
self.find_button.setText(_("F&ind"))
self.find_button.setObjectName(_fromUtf8("find_button"))
self.hboxlayout.addWidget(self.find_button)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.hboxlayout.addItem(spacerItem)
self.verticalLayout.addLayout(self.hboxlayout)
self.table = QtGui.QTableWidget(EditAuthorsDialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.table.sizePolicy().hasHeightForWidth())
self.table.setSizePolicy(sizePolicy)
self.table.setColumnCount(0)
self.table.setObjectName(_fromUtf8("table"))
self.table.setRowCount(0)
self.verticalLayout.addWidget(self.table)
self.gridlayout = QtGui.QGridLayout()
self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
self.sort_by_author = QtGui.QPushButton(EditAuthorsDialog)
self.sort_by_author.setText(_("Sort by author"))
self.sort_by_author.setObjectName(_fromUtf8("sort_by_author"))
self.gridlayout.addWidget(self.sort_by_author, 0, 0, 1, 1)
self.sort_by_author_sort = QtGui.QPushButton(EditAuthorsDialog)
self.sort_by_author_sort.setText(_("Sort by author sort"))
self.sort_by_author_sort.setObjectName(_fromUtf8("sort_by_author_sort"))
self.gridlayout.addWidget(self.sort_by_author_sort, 0, 1, 1, 1)
self.recalc_author_sort = QtGui.QPushButton(EditAuthorsDialog)
self.recalc_author_sort.setToolTip(_("Reset all the author sort values to a value automatically\n"
"generated from the author. Exactly how this value is automatically\n"
"generated can be controlled via Preferences->Advanced->Tweaks"))
self.recalc_author_sort.setText(_("Recalculate all author sort values"))
self.recalc_author_sort.setObjectName(_fromUtf8("recalc_author_sort"))
self.gridlayout.addWidget(self.recalc_author_sort, 1, 0, 1, 1)
self.auth_sort_to_author = QtGui.QPushButton(EditAuthorsDialog)
self.auth_sort_to_author.setToolTip(_("Copy author sort to author for every author. You typically use this button\n"
"after changing Preferences->Advanced->Tweaks->Author sort name algorithm"))
self.auth_sort_to_author.setText(_("Copy all author sort values to author"))
self.auth_sort_to_author.setObjectName(_fromUtf8("auth_sort_to_author"))
self.gridlayout.addWidget(self.auth_sort_to_author, 1, 1, 1, 1)
self.buttonBox = QtGui.QDialogButtonBox(EditAuthorsDialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridlayout.addWidget(self.buttonBox, 1, 2, 1, 1)
self.verticalLayout.addLayout(self.gridlayout)
self.label.setBuddy(self.find_box)
self.retranslateUi(EditAuthorsDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), EditAuthorsDialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), EditAuthorsDialog.reject)
QtCore.QMetaObject.connectSlotsByName(EditAuthorsDialog)
def retranslateUi(self, EditAuthorsDialog):
pass