forked from MichaelVoelkel/qt-collapsible-section
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ad5cf3
commit 6ad10b1
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |