PDA

View Full Version : Dispaly default values of widgets from server in dynamic form loaded through QUiLoa..



Charvi
27th April 2012, 08:51
Hi,

I have two .ui files. I am loading these dynamically through QUiLoader. Now I want to display some default values in the widgets in these forms. But the problem is what values to be displayed will come from the server. So is it possible to set values this way dynamically? I know I could use the findChild<>T() but in that case I have to know all the children in the forms and there Object names also. But I want one generic Qt program which can load any .ui file dynamically. So how can I set the deafult values coming form the server without including this in the Qt App?

Charvi
27th April 2012, 11:18
Bump . . .

Charvi
30th April 2012, 06:34
One more bump ...

ChrisW67
30th April 2012, 08:39
10 points for the oddest design I've seen yet.

If you want default values in your form and you don't wan the client to have to know the form intimately then you can only do it at the server. One way or the other some code is going to have to know where to put the value.