Пример #1
0
    def __init__(self, editor, layout=None, *args, **kw):
        super(_FilterTableView, self).__init__(editor, *args, **kw)
        # layout = QVBoxLayout()
        # layout.setSpacing(1)
        # self.table = table = _TableView(parent)

        hl = QHBoxLayout()
        # hl.setSpacing(10)
        #
        self.button = button = QPushButton()
        button.setIcon(icon('delete').create_icon())
        button.setEnabled(False)
        button.setFlat(True)
        button.setSizePolicy(QSizePolicy.Fixed,
                             QSizePolicy.Fixed)
        button.setFixedWidth(15)
        button.setFixedHeight(15)

        self.text = text = QLineEdit()
        self.cb = cb = QCheckBox()
        #
        text.setEnabled(False)
        button.setEnabled(False)
        # table.setEnabled(False)
        # cb.setSizePolicy(QSizePolicy.Fixed,
        # QSizePolicy.Fixed)
        # cb.setFixedWidth(20)
        # cb.setFixedHeight(20)
        #
        hl.addWidget(cb)
        hl.addWidget(text)
        hl.addWidget(button)
        layout.addLayout(hl)
Пример #2
0
 def _create_control(self, parent):
     """ Create the toolkit-specific control that represents the widget. """
     control = QLineEdit(parent)
     return control