Skip to content

Commit

Permalink
Add label list to Drawer example
Browse files Browse the repository at this point in the history
  • Loading branch information
laserpants committed Oct 12, 2017
1 parent 508245c commit d8e2513
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/drawersettingseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,28 @@ DrawerSettingsEditor::DrawerSettingsEditor(QWidget *parent)
m_drawer->setClickOutsideToClose(true);
m_drawer->setOverlayMode(true);

//

QVBoxLayout *drawerLayout = new QVBoxLayout;
m_drawer->setDrawerLayout(drawerLayout);

QVector<QString> labels = {"Motion", "Style", "Layout", "Components", "Patterns", "Growth & communications", "Usability", "Platforms", "Resources"};

QVector<QString>::iterator it;
for (it = labels.begin(); it != labels.end(); ++it) {
QLabel *label = new QLabel(*it);
label->setMinimumHeight(30);
label->setFont(QFont("Roboto", 10, QFont::Medium));
drawerLayout->addWidget(label);
}

drawerLayout->addStretch(3);
m_drawer->setContentsMargins(10, 0, 0, 0);

drawerLayout->addWidget(new QPushButton("abc"));

//

setupForm();

connect(ui->showDrawerButton, SIGNAL(pressed()), m_drawer, SLOT(openDrawer()));
Expand Down

0 comments on commit d8e2513

Please sign in to comment.