Add clear buttons to all QLineEdit text boxes

This commit is contained in:
BigBahss 2020-09-10 16:00:26 -04:00 committed by huderlem
parent 7db62de548
commit 698e4e38e7
7 changed files with 30 additions and 3 deletions

View file

@ -195,6 +195,9 @@
<property name="placeholderText">
<string>Filter maps...</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>

View file

@ -51,6 +51,9 @@
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The name of the new map. If the name is invalid (red), it will be replaced with the default name of a new map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">

View file

@ -113,7 +113,11 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="nameLineEdit"/>
<widget class="QLineEdit" name="nameLineEdit">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="typeLabel">
@ -148,6 +152,9 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
@ -162,6 +169,9 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>

View file

@ -799,7 +799,11 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_RM_MapName"/>
<widget class="QLineEdit" name="lineEdit_RM_MapName">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_RM_CityMap">

View file

@ -272,7 +272,11 @@
</spacer>
</item>
<item row="14" column="0" colspan="3">
<widget class="QLineEdit" name="lineEdit_metatileLabel"/>
<widget class="QLineEdit" name="lineEdit_metatileLabel">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="comboBox_layerType"/>

View file

@ -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);

View file

@ -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);