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


Python HistoryLineEdit.setMinimumSize方法代碼示例

本文整理匯總了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
開發者ID:yeyanchao,項目名稱:calibre,代碼行數:44,代碼來源:xexp_edit_ui.py

示例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
開發者ID:yeyanchao,項目名稱:calibre,代碼行數:85,代碼來源:edit_authors_dialog_ui.py


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