2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-11-21 13:14:38 +00:00
|
|
|
#include <QPushButton>
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#include "flowlayout.h"
|
|
|
|
#include "window.h"
|
|
|
|
//! [1]
|
|
|
|
Window::Window()
|
|
|
|
{
|
|
|
|
FlowLayout *flowLayout = new FlowLayout;
|
|
|
|
|
|
|
|
flowLayout->addWidget(new QPushButton(tr("Short")));
|
|
|
|
flowLayout->addWidget(new QPushButton(tr("Longer")));
|
|
|
|
flowLayout->addWidget(new QPushButton(tr("Different text")));
|
|
|
|
flowLayout->addWidget(new QPushButton(tr("More text")));
|
|
|
|
flowLayout->addWidget(new QPushButton(tr("Even longer button text")));
|
|
|
|
setLayout(flowLayout);
|
|
|
|
|
|
|
|
setWindowTitle(tr("Flow Layout"));
|
|
|
|
}
|
2011-04-27 17:16:41 +00:00
|
|
|
//! [1]
|