Sun, 03 Nov 2019 17:57:21 +0200
added dependency loading
#include "document.h" #include "ui_document.h" #include "model.h" Document::Document(Model* model, QWidget* parent) : QWidget{parent}, model{model}, ui{*new Ui::Document} { this->ui.setupUi(this); this->ui.listView->setModel(model); connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged); } Document::~Document() { delete &this->ui; } QByteArray Document::saveSplitterState() const { return this->ui.splitter->saveState(); } void Document::restoreSplitterState(const QByteArray& state) { this->ui.splitter->restoreState(state); }