diff options
Diffstat (limited to 'Swift/QtUI/QtMainWindowFactory.cpp')
-rw-r--r-- | Swift/QtUI/QtMainWindowFactory.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Swift/QtUI/QtMainWindowFactory.cpp b/Swift/QtUI/QtMainWindowFactory.cpp index 1fa7d75..b62e698 100644 --- a/Swift/QtUI/QtMainWindowFactory.cpp +++ b/Swift/QtUI/QtMainWindowFactory.cpp @@ -4,12 +4,16 @@ namespace Swift { -QtMainWindowFactory::QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory) : treeWidgetFactory_(treeWidgetFactory) { - +QtMainWindowFactory::QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory, QSplitter* splitter) : treeWidgetFactory_(treeWidgetFactory) { + splitter_ = splitter; } MainWindow* QtMainWindowFactory::createMainWindow() { - return new QtMainWindow(treeWidgetFactory_); + QtMainWindow* window = new QtMainWindow(treeWidgetFactory_); + if (splitter_) { + splitter_->addWidget(window); + } + return window; } } |