Refactored ItemDetailMapper to encapsulate widget creation and their mappings into functions to be able to iterate over meta data to auto generate them. (Only working for string roles for now)

This commit is contained in:
2026-03-02 14:09:55 +01:00
parent d56af7231c
commit 0e7f803d42
3 changed files with 123 additions and 92 deletions

View File

@ -22,8 +22,7 @@ void EditItemDialog::createContent() {
QHBoxLayout* innerLayout = new QHBoxLayout();
m_contentContainer->setLayout(innerLayout);
m_detailMapper = new ItemDetailMapper(this);
m_detailMapper->setModelMappings(m_tableView);
m_detailMapper = new ItemDetailMapper(m_tableView, this);
innerLayout->addWidget(m_detailMapper);
updateQRCode();