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() <
For adding it into vector
QString text = ui->lineEdit->text();
QTextStream * stream = new QTextStream(&text , QIODevice::ReadOnly);
QVector lines;
while (!stream->atEnd())
{
lines << stream->readLine();
}