Exemplo n.º 1
0
    def __init__(self,
                 parent=0,
                 complete_items=[],
                 sep=',',
                 space_before_sep=False):
        EnLineEdit.__init__(self, parent)

        self.separator = sep
        self.space_before_sep = space_before_sep

        self.connect(self, SIGNAL('textChanged(QString)'), self.text_changed)

        self.completer = ItemsCompleter(self, complete_items)
        self.completer.setCaseSensitivity(Qt.CaseInsensitive)

        self.connect(self,
                     SIGNAL('text_changed(PyQt_PyObject, PyQt_PyObject)'),
                     self.completer.update)
        self.connect(self.completer, SIGNAL('activated(QString)'),
                     self.complete_text)

        self.completer.setWidget(self)
Exemplo n.º 2
0
    def __init__(self):
        QWidget.__init__(self)
        self.ui = Ui_SummaryWidget()
        self.ui.setupUi(self)

        self.ui.content.setText("")
        self.timer = QTimer()
        self.start_time = 0

        try:
            self.connect(self.timer, SIGNAL("timeout()"), self.updateCounter)
        except:
            pass