Using QDataWidgetMapper in ItemDetailMapper to work with the model data (current index of the TableView).
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user