Play with something like this ...
void mainwindow::openfile()
{
// for testing only ....
qDebug() << "we are in openfile() now";
path
= QFileDialog::getOpenFileName(this, tr
("Open Database File"),
"/Users", tr
("SQLite Database File (*.db)"));
qDebug() << path;
if ( !path.isEmpty() )
{
qDebug() << "path not empty";
loaddatabase();
}
else
{
qDebug() << "path is empty";
{
}
void mainwindow::openfile()
{
// for testing only ....
qDebug() << "we are in openfile() now";
path = QFileDialog::getOpenFileName(this, tr("Open Database File"), "/Users", tr("SQLite Database File (*.db)"));
qDebug() << path;
if ( !path.isEmpty() )
{
qDebug() << "path not empty";
loaddatabase();
}
else
{
qDebug() << "path is empty";
{
}
To copy to clipboard, switch view to plain text mode
Regards Guenther
Bookmarks