Skip to content

Commit 0a55bcd

Browse files
Updated README.md to use the new factory function CDockManager::createDockWidget()
1 parent f41a6f0 commit 0a55bcd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ MainWindow::MainWindow(QWidget *parent) :
462462
// Create the dock manager after the ui is setup. Because the
463463
// parent parameter is a QMainWindow the dock manager registers
464464
// itself as the central widget as such the ui must be set up first.
465-
m_DockManager = new ads::CDockManager(this);
465+
DockManager = new ads::CDockManager(this);
466466

467467
// Create example content label - this can be any application specific
468468
// widget
@@ -473,15 +473,15 @@ MainWindow::MainWindow(QWidget *parent) :
473473

474474
// Create a dock widget with the title Label 1 and set the created label
475475
// as the dock widget content
476-
ads::CDockWidget* DockWidget = new ads::CDockWidget("Label 1");
476+
ads::CDockWidget* DockWidget = DockManager->createDockWidget("Label 1");
477477
DockWidget->setWidget(l);
478478

479479
// Add the toggleViewAction of the dock widget to the menu to give
480480
// the user the possibility to show the dock widget if it has been closed
481481
ui->menuView->addAction(DockWidget->toggleViewAction());
482482

483483
// Add the dock widget to the top dock widget area
484-
m_DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
484+
DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
485485
}
486486

487487
MainWindow::~MainWindow()

0 commit comments

Comments
 (0)