You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Numeric entry fields should work like table cells that expect numeric data. That is, it should be possible to type something like 2+2 into the field and have that evaluated to 4. The edit data will need to be preserved separate from the display value, but it does not need to be persisted in the database.
The text was updated successfully, but these errors were encountered:
The way this is done in tables takes advantage of the fact that behind the display is a model with multiple roles. That doesn't exist for QLineEdit, but if we're willing to discard the notion of preserving the original expression, it's very simple to introduce this functionality through the abuse of QValidator by having the fixup() method evaluate the script. In order to detect if the output is valid we can chain another validator on and use the validate() method to return Acceptable if the other validator returns the same, otherwise returning Intermediate. It probably isn't worth the effort to determine if the input can't possibly be valid JavaScript.
Numeric entry fields should work like table cells that expect numeric data. That is, it should be possible to type something like 2+2 into the field and have that evaluated to 4. The edit data will need to be preserved separate from the display value, but it does not need to be persisted in the database.
The text was updated successfully, but these errors were encountered: