PDA

View Full Version : Reactive text



hazelnusse
16th June 2012, 08:02
I would like to create a form that allows the user to change numeric floating point numbers by clicking and dragging on the number as opposed to typing the number into a field, dragging a slider, or using a spin box. Ideally, it would work something like the Tangle Javascript library that Brett Victor made:

http://worrydream.com/Tangle/

I am sure this is possible with Qt, but I don't know enough about making custom widgets to know where to get started on making something like this. Does anybody know if this sort of thing already exists for Qt, and if not, where I should start looking to figure out how to make this type of widget?

Thanks,
~Luke

wysota
16th June 2012, 08:30
Subclass QSpinBox (or whatever you want the number to be displayed in) and reimplement mouse events.