私はおそらくnoobの問題に悩まされているので、私はQt(Objective-Cをほとんど使用します)を初めて使っています。QMainWindowはshow()の直後に終了します
this->close();
SQLWindow window;
window.receivePath(path); //Path for the .sqlite file
window.show()
QDialog
閉じをし、ミリ秒のために私は、新しいウィンドウの片鱗を見たが、それはあまりにも閉じ:QDialog
窓から私はこのようなQMainWindow
開こう。以下はQMainWindow
一部です:
SQLWindow::SQLWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::SQLWindow)
{
ui->setupUi(this);
this->initialSetup();
}
SQLWindow::~SQLWindow()
{
delete ui;
}
void SQLWindow::initialSetup()
{
ui->tableView->setSortingEnabled(true);
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
}
void SQLWindow::receivePath(QString path)
{
this->openDatabase(path);
}
void SQLWindow::openDatabase(QString path)
{
//Opening database just fine
}
ダイアログが閉じても問題がダイアログアプリケーションにあると予想します。また、ウィンドウはスコープが終了したときにもはや存在しないローカル変数です。 – drescherjm