mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-25 17:25:38 -05:00
Add clear buttons to all QLineEdit text boxes
This commit is contained in:
@@ -252,6 +252,7 @@ void Editor::addNewWildMonGroup(QWidget *window) {
|
||||
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
|
||||
|
||||
QLineEdit *lineEdit = new QLineEdit();
|
||||
lineEdit->setClearButtonEnabled(true);
|
||||
form.addRow(new QLabel("Group Base Label:"), lineEdit);
|
||||
QRegularExpressionValidator *validator = new QRegularExpressionValidator(QRegularExpression("[_A-Za-z0-9]*"));
|
||||
lineEdit->setValidator(validator);
|
||||
@@ -511,6 +512,7 @@ void Editor::configureEncounterJSON(QWidget *window) {
|
||||
connect(&newFieldButtonBox, SIGNAL(rejected()), &newNameDialog, SLOT(reject()));
|
||||
|
||||
QLineEdit *newNameEdit = new QLineEdit;
|
||||
newNameEdit->setClearButtonEnabled(true);
|
||||
|
||||
QFormLayout newFieldForm(&newNameDialog);
|
||||
|
||||
|
||||
@@ -580,6 +580,7 @@ void RegionMapEditor::on_pushButton_CityMap_add_clicked() {
|
||||
QFormLayout form(&popup);
|
||||
|
||||
QLineEdit *input = new QLineEdit();
|
||||
input->setClearButtonEnabled(true);
|
||||
form.addRow(new QLabel("Name:"), input);
|
||||
|
||||
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &popup);
|
||||
|
||||
Reference in New Issue
Block a user