Using QDataWidgetMapper in ItemDetailMapper to work with the model data (current index of the TableView).

This commit is contained in:
2025-12-22 11:21:44 +01:00
parent 8d523bb5bc
commit b3f83ccdb0
6 changed files with 185 additions and 8 deletions

View File

@ -7,16 +7,26 @@ class QDoubleSpinBox;
class QLineEdit;
class QSpinBox;
class QLabel;
class QTableView;
class ItemDetailMapper;
class EditItemDialog : public AbstractDialog {
Q_OBJECT
public:
EditItemDialog(QWidget* parent = nullptr);
EditItemDialog(QTableView* tableView, QWidget* parent = nullptr);
/// AbstractDialog interface
void createContent() override;
public slots:
void accept() override;
void reject() override;
private:
QTableView* m_tableView = nullptr;
ItemDetailMapper* m_detailMapper;
QLabel* m_nameLabel = nullptr;
QLineEdit* m_nameEdit = nullptr;