Dynamically adding QLineEdits and then copy text from them to vector in right order
Since the MainWindow destructor is empty, you can just omit it.

In lineedit_textChanged, you declare the index variable at the top,
but it's only used if the text has changed.
It would be better to declare it inside the if branch where you actually use it:

if (isTextchanged)
{
    QStringList list = senderobjName.split("lineedit");
    unsigned int index = list[1].toInt();
    users[index] = text;
}


This snippet can be a bit confusing without braces on the outer if:


if(!middlelayout-&gt;isEmpty())
    if((child = middlelayout-&gt;takeAt(qlist.count()-1)-&gt;widget()) != 0) {
        delete child;
        qlist.removeLast();
}



It would be clearer this way:

if (!middlelayout-&gt;isEmpty()) {
    if ((child = middlelayout-&gt;takeAt(qlist.count()-1)-&gt;widget()) != 0) {
        delete child;
        qlist.removeLast();
    }
}