i've developed an opencv program, i take some folder path from input so i decided to create a gui with qt. The gui is simple, basically it's some button. The problem is that i cannot pass the string from a button to another.
std::string MainWindow::on_pushButton_3_clicked()
{
QString salvataggi=QFileDialog::getExistingDirectory(
this,
tr("Open File"),
"/home/"
);
salvat= salvataggi.toStdString();
return salvat;
}
I tried to use the pointers but without any resoult.
std::string MainWindow::on_pushButton_3_clicked()
{
QString salvataggi=QFileDialog::getExistingDirectory(
this,
tr("Open File"),
"/home/"
);
savee= &salvat;
*savee = salvataggi.toStdString();
return savee;
}
can you tell where i'm wrong? Thanks