Hello, I am having trouble passing a value from one function in Qt to another in a different form

Beastiary.cpp
Qt Code:
  1. void beastiary::on_listWidget_itemClicked(QListWidgetItem *item)
  2. {
  3. const QString nvalue = ui->listWidget->currentItem()->text(); //Value that needs to passed
  4. read red;
  5. red.setModal(true);
  6. red.exec();
  7. red.ulk();
  8.  
  9. }
To copy to clipboard, switch view to plain text mode 

read.cpp
Qt Code:
  1. void read::ulk()
  2. {
  3.  
  4. QFile file (nvalue); //needs nvalue from beastiary so it knows the name of the file to look for
  5. if (!file.open(QFile::ReadOnly | QFile::Text))
  6. {
  7. QMessageBox::warning (this, "Error", "File Could not Be Opened");
  8.  
  9. }
  10. QString line;
  11. QTextStream in(&file);
  12. while (!in.atEnd())
  13. {
  14. line = in.readLine();
  15. ui->lineEdit_name_r->setText(ui->lineEdit_name_r->text()+line);
  16. qDebug() <<line;
  17. }
  18. }
To copy to clipboard, switch view to plain text mode 

The variable nvalue must be obtained in beastiary.cpp but is needed in read.cpp and im not sure of how to pass the variable to read from beastiary.