Make help windows non modal
This commit is contained in:
@@ -32,6 +32,8 @@ HelpDialog::HelpDialog(QWidget *parent) : QDialog(parent)
|
|||||||
{
|
{
|
||||||
setWindowTitle(tr("Help"));
|
setWindowTitle(tr("Help"));
|
||||||
resize(1000, 600);
|
resize(1000, 600);
|
||||||
|
setModal(false);
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||||
QTextEdit *helpText = new QTextEdit(this);
|
QTextEdit *helpText = new QTextEdit(this);
|
||||||
|
|||||||
+1
-1
@@ -306,7 +306,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
menuBar()->addMenu(dockMenu);
|
menuBar()->addMenu(dockMenu);
|
||||||
|
|
||||||
QMenu *helpMenu = menuBar()->addMenu(tr("Help"));
|
QMenu *helpMenu = menuBar()->addMenu(tr("Help"));
|
||||||
helpMenu->addAction(tr("Help"), QKeySequence::HelpContents, [this]{ HelpDialog help(this); help.exec(); });
|
helpMenu->addAction(tr("Help"), QKeySequence::HelpContents, [this]{ HelpDialog *help = new HelpDialog(this); help->show(); });
|
||||||
helpMenu->addAction(tr("About Tenmon"), [this]{ About about(this); about.exec(); });
|
helpMenu->addAction(tr("About Tenmon"), [this]{ About about(this); about.exec(); });
|
||||||
helpMenu->addAction(tr("About Qt"), [this](){ QMessageBox::aboutQt(this); });
|
helpMenu->addAction(tr("About Qt"), [this](){ QMessageBox::aboutQt(this); });
|
||||||
helpMenu->addAction(tr("Check for update"), this, &MainWindow::checkNewVersion);
|
helpMenu->addAction(tr("Check for update"), this, &MainWindow::checkNewVersion);
|
||||||
|
|||||||
Reference in New Issue
Block a user