mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Update README.md
This commit is contained in:
parent
b19cc98c84
commit
b38919e909
20
README.md
20
README.md
@ -100,18 +100,18 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// Create the dock manager
|
// Create the dock manager
|
||||||
m_DockManager = new ads::CDockManager(this);
|
m_DockManager = new ads::CDockManager(this);
|
||||||
|
|
||||||
QLabel* l = new QLabel();
|
QLabel* l = new QLabel();
|
||||||
l->setWordWrap(true);
|
l->setWordWrap(true);
|
||||||
l->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
l->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
||||||
l->setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ");
|
l->setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ");
|
||||||
|
|
||||||
// Create a dock widget with the title Label 1
|
// Create a dock widget with the title Label 1
|
||||||
ads::CDockWidget* DockWidget = new ads::CDockWidget("Label 1");
|
ads::CDockWidget* DockWidget = new ads::CDockWidget("Label 1");
|
||||||
DockWidget->setWidget(l);
|
DockWidget->setWidget(l);
|
||||||
ui->menuView->addAction(DockWidget->toggleViewAction());
|
ui->menuView->addAction(DockWidget->toggleViewAction());
|
||||||
m_DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
m_DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user