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

fixup in Validator does not replace value in lineEdit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.0
    • 1.1.0
    • PySide
    • win7 64bit. Python 2.7 Pyside 1.1
    • 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

            crmaurei Cristian Maureira-Fredes
            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