2023-05-05 15:19:58 +02:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
|
|
|
|
2023-05-04 08:26:31 +02:00
|
|
|
#include "layoutbuilder.h"
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
|
|
using namespace Layouting;
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
2023-05-05 15:19:58 +02:00
|
|
|
Id textId;
|
|
|
|
|
|
2023-05-04 08:26:31 +02:00
|
|
|
Application app
|
|
|
|
|
{
|
|
|
|
|
resize(600, 400),
|
|
|
|
|
title("Hello World"),
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
TextEdit {
|
2023-05-05 15:19:58 +02:00
|
|
|
id(textId),
|
2023-05-04 08:26:31 +02:00
|
|
|
text("Hallo")
|
|
|
|
|
},
|
|
|
|
|
|
2023-05-05 15:19:58 +02:00
|
|
|
Row {
|
|
|
|
|
SpinBox {
|
|
|
|
|
onTextChanged([&](const QString &text) { setText(textId, text); })
|
|
|
|
|
},
|
2023-05-04 08:26:31 +02:00
|
|
|
|
2023-05-05 15:19:58 +02:00
|
|
|
Stretch(),
|
|
|
|
|
|
|
|
|
|
PushButton {
|
|
|
|
|
text("Quit"),
|
|
|
|
|
onClicked([] { QApplication::quit(); })
|
|
|
|
|
},
|
|
|
|
|
}
|
2023-05-04 08:26:31 +02:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return app.exec(argc, argv);
|
|
|
|
|
}
|