Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-106

fixup in Validator does not replace value in lineEdit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.1.0, dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Labels:
    • Environment:
      win7 64bit. Python 2.7 Pyside 1.1
    • Commits:
      6c0a0d70305cd6e12260a352099e74d34f3c239e

      Description

      If construct QtValidator with fixup method.
      Then call using lineEdit. Fixup runs but returned value is not placed into lineEdit slot in UI.
      E.g.

      class Param_validate_value(QtGui.QValidator):
      
          def __init__(self, r_min, r_max):
              super(Param_validate_value, self).__init__()
              self.min = r_min
              self.max = r_max
          
          def validate(self, entry, cursor_pos):
              return QtGui.QValidator.Intermediate
              
          def fixup(self, entry):
              print "22"
              return "22"
      

      Expected behaviour has 22 placed into slot when validator is triggered.
      But value remains unchanged in lineEdit slot.

        Attachments

        For Gerrit Dashboard: PYSIDE-106
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              neon22 Mark Schafer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes