QString QTextStream::readLine(qint64 maxlen = 0)
For reading text you can use QTextStream
QString text = ui->lineEdit->text();
QTextStream * stream = new QTextStream(&text , QIODevice::ReadOnly);
QString line1 = stream->readLine();
QString line2 = stream->readLine();
qDebug() <<line1;
For adding it into vector
QString text = ui->lineEdit->text();
QTextStream * stream = new QTextStream(&text , QIODevice::ReadOnly);
QVector<QString > lines;
while (!stream->atEnd())
{
lines << stream->readLine();
}