PDA

View Full Version : simple data binding



Midek
13th July 2011, 21:56
Hello,

I want to bind simple data, not lists, trees, tables. Just few strings, numbers between my model class and screen view (appropriate widgets). What is the sipmlest way?

Should I use QAbstractItemModel? Or it is better to use signals and slots for each value change? Or is there another simpler way?

Thanks,

Miro

Santosh Reddy
14th July 2011, 03:23
You could use any of these, it should be decided based on how data is used by view and model, if the usage fits into model/view interface classes then you can use QAbstractItemModel. It the data is simple and is limited to couple of strings then can use signal & slots.