prjemian / assign_gup

Assist in assigning APS GUPs to PRP members
http://assign_gup.readthedocs.io
0 stars 1 forks source link

number entry confuses users in topic slider #33

Closed prjemian closed 8 years ago

prjemian commented 8 years ago

When clearing the number in the entry box of the topic slider, or a couple other situations, the text being edited is replaced with a string representing the current known floating point value. That action moves the insertion point and confuses the user.

prjemian commented 8 years ago
prjemian commented 8 years ago

The problem stems from the code correcting the text value when the user has typed in something not allowed. Perhaps Qt has some helpers that can restrict this entry to white-space or 0.0 - 1.0 floating point range?

prjemian commented 8 years ago

search for Qt4 QLineEdit validator example

prjemian commented 8 years ago

http://snorf.net/blog/2014/08/09/validating-user-input-in-pyqt4-using-qvalidator/

prjemian commented 8 years ago

when text is "0.4" and [backspace] key is pressed, text is re-edited by code to be "0.0" - fix this