Read this: http://doc.trolltech.com/4.1/tutorial-t6.html
You probably want to use QVBoxLayout instead of QGridLayout (and don't forget to invoke show() on each widget, if you create them after their parent was shown). You can use QList to store pointers to line edits, so that you can delete them when the user wants to reduce their number.
Bookmarks