Here, the QValidator creates an object and is set as a validator object. So, it should be live at the time of running the software also.
So, you have to do the following:
1. You have to create a DATA property variable for the TEXTBOX object to hold the validator object:
DATA oValidator INIT Nil
2. At the time of creating the validator and setting it to the textbox object:
::oValidator := QValidator():New("^(\d|-)?(\d|,)*\.?\d*$")
::oQTObject:setValidator(::oValidator)
By this way both the objects (ie., oQTObject and oVAlidator) are available at the run time. I think it should work. Please try.