#include "GoShoppingView.h"\r
#include "ui_GoShopping.h"\r
\r
-GoShoppingView::GoShoppingView(QWidget *parent)\r
- :QWidget(parent), ui(new Ui::GoShoppingView)\r
+#include "ShoppingTreeModel.h"\r
+\r
+GoShoppingView::GoShoppingView(QString xmlFileName, QWidget *parent)\r
+ :QDialog(parent), ui(new Ui::GoShoppingView)\r
{\r
ui->setupUi(this);\r
+ ShoppingTreeModel *model = new ShoppingTreeModel(xmlFileName, this);\r
+ ui->treeView->setModel(model);\r
+ for(int column = 0; column < model->columnCount(); column++)\r
+ ui->treeView->resizeColumnToContents(column);\r
}\r
\r
GoShoppingView::~GoShoppingView()\r