how to create multiple childs of a widget
Hello everyone,
I am asking you a general Qt question which puzzled my mind. Hope i will got some experts review. :)
Currently i am working on a project which need to create a widget contain some tabs (~30 tabs) and each tab contains ~10-30 options.
If i do the total child widgets count then it goes around 450 :eek: child widgets.
My problen is how to implement this kind of widget which contains such a huge number of childs.
Should i use Qt Designer which is preferable or there is something interesting which i don't know yet??? :confused:
Please help me to get out of this problem and clear my thoughts.
Thanks
Re: how to create multiple childs of a widget
Write some code generator ;)
Re: how to create multiple childs of a widget
I would design each tab individually and then add their instances to the tab widget in code.
The tab widget itself in its window can of course be a made in designer as well.
Cheers,
_
Re: how to create multiple childs of a widget
Hi anda_skoa,
According to you i have to create each 25-30 tabs individually in designer and then create its instance according to the option selection?
OR does a dynamic code generator as west said will work??
:confused::confused::confused:
If i use Qt Designer then i have to drag each 400 input elements and its labels etc, will be time consuming.
i just don't want to spend more time in dragging and dropping. May be what you have said would be the right answer but if there is any other solution then it will be the pain killer of my current project.
:)
Re: how to create multiple childs of a widget
You didn't give any indication on what these tabs will look like.
If they are just contain repetitions of the same element, then this can easily be done in code.
Otherwise they are normal widgets and can be created in designer, but you can always also code them.
Cheers,
_
Re: how to create multiple childs of a widget
Thanks anda_skoa for your reply.
Actually all the widgets are different ai i decide to create all widgets dynamically.. :)