示例#1
0
void MainWindow::showOptionsDialog()
{
    if (OptionsDialog::isDialogCreated())
        return;

    OptionsDialog *dlg = new OptionsDialog(m_serverRepository, this);
    dlg->setAttribute(Qt::WA_DeleteOnClose);
    dlg->show();
}
示例#2
0
void Controls::on_actionComponent_triggered()
{
    OptionsDialog *od = new OptionsDialog(m_model->fullPath(), m_model->components(), this);
    od->setAttribute(Qt::WA_DeleteOnClose);
    int result = od->exec();
    if (result == QDialog::Accepted)
    {
        emit openFile(m_model->fullPath());
    }
}