Add clear buttons to all QLineEdit text boxes
This commit is contained in:
parent
7db62de548
commit
698e4e38e7
7 changed files with 30 additions and 3 deletions
|
@ -195,6 +195,9 @@
|
|||
<property name="placeholderText">
|
||||
<string>Filter maps...</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -51,6 +51,9 @@
|
|||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The name of the new map. If the name is invalid (red), it will be replaced with the default name of a new map.</p></body></html></string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue