forked from qt-creator/qt-creator
EnvironmentDialog: Add help text to make usage more obvious
Change-Id: I13e1397b14ab6f1288bcc0626f358b9722c47d50 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
43072e82d2
commit
83c5629545
@@ -115,18 +115,22 @@ EnvironmentDialog::EnvironmentDialog(QWidget *parent) :
|
|||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
resize(640, 480);
|
resize(640, 480);
|
||||||
d->m_editor = new Internal::EnvironmentItemsWidget(this);
|
d->m_editor = new Internal::EnvironmentItemsWidget(this);
|
||||||
d->m_editor->setToolTip(tr("Enter one variable per line with the variable name "
|
|
||||||
"separated from the variable value by \"=\".<br>"
|
|
||||||
"Environment variables can be referenced with ${OTHER}."));
|
|
||||||
auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
||||||
connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||||
connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||||
|
|
||||||
|
auto helpLabel = new QLabel(this);
|
||||||
|
helpLabel->setText(tr("Enter one environment variable per line.\n"
|
||||||
|
"To set or change a variable, use VARIABLE=VALUE.\n"
|
||||||
|
"Existing variables can be referenced in a VALUE with ${OTHER}.\n"
|
||||||
|
"To clear a variable, put its name on a line with nothing else on it."));
|
||||||
|
|
||||||
auto layout = new QVBoxLayout(this);
|
auto layout = new QVBoxLayout(this);
|
||||||
QLabel *label = new QLabel(this);
|
|
||||||
label->setText(tr("Change environment by assigning one environment variable per line:"));
|
|
||||||
layout->addWidget(label);
|
|
||||||
layout->addWidget(d->m_editor);
|
layout->addWidget(d->m_editor);
|
||||||
|
layout->addWidget(helpLabel);
|
||||||
|
|
||||||
layout->addWidget(box);
|
layout->addWidget(box);
|
||||||
|
|
||||||
setWindowTitle(tr("Edit Environment"));
|
setWindowTitle(tr("Edit Environment"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user