Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelVoelkel authored Oct 7, 2016
1 parent 5ad5cf3 commit 6ad10b1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# QT-collapsable-section
# QT: Collapsible Section

This is a simple collapsable section for QT. It has been tested with QT5.6.

Special thanks to "x squared" who has posted the original code for this idea at StackOverflow: http://stackoverflow.com/a/37119983/2573127

## Sample Code

Section* section = new Section("Section title", 300, parentWidget);
auto* anyLayout = new QVBoxLayout();
anyLayout->addWidget(new QLabel("Some Text in Section", section));
anyLayout->addWidget(new QPushButton("Button in Section", section));

section->setContentLayout(*anyLayout);

## Sample Animation

![section opening and closing](example.gif)

0 comments on commit 6ad10b1

Please sign in to comment.