I have read the data from file to Qlistwidgets and now I want to do the multiple selection (using control + mouse left click) randomly 2 or 3 rows and copy the data to another listwidgets. I want the same row number selected in both list widgets.

code for reading the data to list widgets, I didn't know how to proceed further to complete the task

QString filename=QFileDialog::getOpenFileName(this, tr("Open File"), "media://", "All files (.);; Text File (*.txt)");

QFile file3(filename);

if(!file3.open(QFile::ReadOnly|QFile::Text))
QMessageBox::information(0,"info", file3.errorString());

else
{ QTextStream in3(&file3);

while (!in3.atEnd()) {

QString line = in3.readLine();

QStringList list = line.split(" ");

ui->xvalue->addItem(list[0]);
ui->yvalue->addItem(list[1]);


}
}