Skip to content

Commit

Permalink
Updated README.md to use the new factory function CDockManager::creat…
Browse files Browse the repository at this point in the history
…eDockWidget()
  • Loading branch information
githubuser0xFFFF committed Dec 20, 2024
1 parent f41a6f0 commit 0a55bcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ MainWindow::MainWindow(QWidget *parent) :
// Create the dock manager after the ui is setup. Because the
// parent parameter is a QMainWindow the dock manager registers
// itself as the central widget as such the ui must be set up first.
m_DockManager = new ads::CDockManager(this);
DockManager = new ads::CDockManager(this);

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

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

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

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

MainWindow::~MainWindow()
Expand Down

0 comments on commit 0a55bcd

Please sign in to comment.