PDA

View Full Version : Dynamic form layout - Ability to add new rows



FaradayCage
22nd July 2010, 16:15
I've created a form with one row of inputs but I need to user to be able to add as many new rows as they want. Basically I need the Add Parameter button to work on this form. I've looked around for examples etc. but they all seem to be extending tables and the like. Just wondering how/if this is possible in my case?

Screenshot: http://img710.imageshack.us/img710/558/fitparameterinput.png

Thanks

Lykurg
22nd July 2010, 16:23
please attach you images here at the forum and not on 3rd party sites.

You can use any QLayout class and can add widgets at run time. The layout will extends itself to get enough space to show your added widget(s). E.g. you can call QBoxLayout::addWidget() from a QVBoxLayout as often you want. (Also remove widgets!)