Answer the question
In order to leave comments, you need to log in
Qt C++ how to pass file path to function?
I'm trying to learn C++ and I'm dumb.
I need to pass the file path ( file_name ) to the openbase function
// Меню - Файл - Открыть
void MainWindow::on_action_triggered()
{
// диалог выбора файла
QString file_name = QFileDialog::getOpenFileName();
}
// Подключить базу
void MainWindow::openbase(char* str)
{
ui->listWidget->addItem(str);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question