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

fixup in Validator does not replace value in lineEdit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 6.0
    • 1.1.0
    • PySide
    • win7 64bit. Python 2.7 Pyside 1.1
    • 6c0a0d70305cd6e12260a352099e74d34f3c239e, af7a0c68c (dev), 83445c3ae (6.8)

      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.

        1. pyside-106.py
          0.6 kB
          Christian Tismer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            neon22 Mark Schafer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes