Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Widget : public WCompositeWidget {
- WVBoxLayout* southLayout;
- void Reset () {
- southLayout->clear();
- southLayout->addLayout(new WVBoxLayout);
- }
- public:
- Widget (WContainerWidget* parent = nullptr)
- : WCompositeWidget(parent), southLayout(nullptr)
- {
- auto impl = new WContainerWidget;
- auto layout = new WVBoxLayout(impl);
- setImplementation(impl);
- auto btnReset = new WPushButton("reset");
- btnReset->clicked().connect(this, &Widget::Reset);
- layout->addWidget(btnReset, 0, AlignCenter);
- southLayout = new WVBoxLayout;
- layout->addLayout(southLayout);
- Reset();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment