skizzik
23rd August 2011, 12:58
In my program I use a QFileDialog to let the user pick a file to open. This works perfect as it should both when I start the program from inside Qt and when I start the app-bundle in finder (I'm sitting on a mac).
Now I want to deploy the application so it can be used on other computers without Qt installed. I use a script that copies some Qt frameworks (core and gui) to inside the app-bundle and then use install_name_tool. I have used the exact same script for many other programs before and it works perfect.
The final app-bundle works fine to start. When I click the button to open the filedialog, it shows as it should. But when I close the dialog window, the program crashes with a EXC_BAD_ACCESS. It doesn't matter if I chose a file or not, it always crashes directly after I try to close the file dialog. I have commented out all the other code for the button-click so it must be something with the filedialog.
The function is now:
void MainWindow::button_clicked()
{
QString name = QFileDialog::getOpenFileName(this, "Open File");
}
Any ideas?
Now I want to deploy the application so it can be used on other computers without Qt installed. I use a script that copies some Qt frameworks (core and gui) to inside the app-bundle and then use install_name_tool. I have used the exact same script for many other programs before and it works perfect.
The final app-bundle works fine to start. When I click the button to open the filedialog, it shows as it should. But when I close the dialog window, the program crashes with a EXC_BAD_ACCESS. It doesn't matter if I chose a file or not, it always crashes directly after I try to close the file dialog. I have commented out all the other code for the button-click so it must be something with the filedialog.
The function is now:
void MainWindow::button_clicked()
{
QString name = QFileDialog::getOpenFileName(this, "Open File");
}
Any ideas?