Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

        def validate_widget(widget):
    state = widget.validator().validate(widget.text(), widget.cursorPosition())
    if state[0] != QtGui.QValidator.Acceptable:
        if state[0] == QtGui.QValidator.Intermediate:
            pos = widget.text().length()
        elif len(state) == 2:
            pos = state[1]
        elif len(state) == 3:
            pos = state[2]
        else:
            pos = 0
        widget.setFocus()
        widget.setCursorPosition(pos)
        return False
    return True
        


src/n/w/nwqt4-0.2/nwqt4/request_config/random_wallpaper.py   nwqt4(Download)
    def is_valid(self):
        if not validators.validate_widget(self.resolutionsEdit):
            return False
        if not validators.validate_widget(self.tagsEdit):
            return False
        if not validators.validate_widget(self.notagsEdit):

src/n/w/nwqt4-0.2/nwqt4/widgets/wallpaper_info.py   nwqt4(Download)
    def is_valid(self):
        return validators.validate_widget(self.addTagsEdit)
 
    def export_values(self):
        return {

src/n/w/nwqt4-0.2/nwqt4/dialogs/add_url.py   nwqt4(Download)
    def accept(self):
        if unicode(self.urlEdit.text())[:7] != 'http://':
            return self.urlEdit.setFocus()
 
        if not validators.validate_widget(self.tagsEdit):

src/n/w/nwqt4-0.2/nwqt4/dialogs/add_tags.py   nwqt4(Download)
    def accept(self):
        if not validators.validate_widget(self.tagsEdit):
            return
 
        super(AddTags, self).accept()