|
|
@@ -44,10 +44,18 @@ QWidget* BrowseModal::CreateBrowseInput(const char* text)
|
|
|
QHBoxLayout* horizontalLayout_2 = new QHBoxLayout(groupBox);
|
|
|
QLineEdit* lineEdit = new QLineEdit(groupBox);
|
|
|
horizontalLayout_2->addWidget(lineEdit);
|
|
|
- QPushButton* pushButton = new QPushButton(groupBox);
|
|
|
- pushButton->setText(QCoreApplication::translate("BrowseModal", "Parcourir", nullptr));
|
|
|
- horizontalLayout_2->addWidget(pushButton);
|
|
|
- InitializeBrowseInput(groupBox, lineEdit, pushButton, text);
|
|
|
+ QPushButton* browseButton = new QPushButton(groupBox);
|
|
|
+ browseButton->setText(QCoreApplication::translate("BrowseModal", "Parcourir", nullptr));
|
|
|
+ horizontalLayout_2->addWidget(browseButton);
|
|
|
+ QPushButton* removeButton = new QPushButton(groupBox);
|
|
|
+ removeButton->setText(QCoreApplication::translate("BrowseModal", "Retirer", nullptr));
|
|
|
+ horizontalLayout_2->addWidget(removeButton);
|
|
|
+ connect(removeButton, &QAbstractButton::clicked, this, [this, lineEdit, groupBox]()
|
|
|
+ {
|
|
|
+ groupBox->deleteLater();
|
|
|
+ inputs.remove(lineEdit);
|
|
|
+ });
|
|
|
+ InitializeBrowseInput(groupBox, lineEdit, browseButton, text);
|
|
|
return groupBox;
|
|
|
}
|
|
|
|