mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 05:22:06 +08:00
Fixed indentationin README.md example
This commit is contained in:
parent
8f54dd2a82
commit
c9a97534a8
32
README.md
32
README.md
@ -101,26 +101,26 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
// Create the dock manager. Because the parent parameter is a QMainWindow
|
// Create the dock manager. Because the parent parameter is a QMainWindow
|
||||||
// the dock manager registers itself as the central widget.
|
// the dock manager registers itself as the central widget.
|
||||||
m_DockManager = new ads::CDockManager(this);
|
m_DockManager = new ads::CDockManager(this);
|
||||||
|
|
||||||
// Create example content label - this can be any application specific
|
// Create example content label - this can be any application specific
|
||||||
// widget
|
// widget
|
||||||
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 and set the created label
|
// Create a dock widget with the title Label 1 and set the created label
|
||||||
// as the dock widget content
|
// as the dock widget content
|
||||||
ads::CDockWidget* DockWidget = new ads::CDockWidget("Label 1");
|
ads::CDockWidget* DockWidget = new ads::CDockWidget("Label 1");
|
||||||
DockWidget->setWidget(l);
|
DockWidget->setWidget(l);
|
||||||
|
|
||||||
// Add the toggleViewAction of the dock widget to the menu to give
|
// 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
|
// the user the possibility to show the dock widget if it has been closed
|
||||||
ui->menuView->addAction(DockWidget->toggleViewAction());
|
ui->menuView->addAction(DockWidget->toggleViewAction());
|
||||||
|
|
||||||
// Add the dock widget to the top dock widget area
|
// Add the dock widget to the top dock widget area
|
||||||
m_DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
m_DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user