forked from qt-creator/qt-creator
Currently almost the same as the comparison example, but planeed to grow. Change-Id: Id129266a1b5b12438e2fb643ee114e6d816581f6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
34 lines
627 B
C++
34 lines
627 B
C++
#include "layoutbuilder.h"
|
|
|
|
#include <QApplication>
|
|
#include <QDebug>
|
|
|
|
using namespace Layouting;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Application app
|
|
{
|
|
resize(600, 400),
|
|
title("Hello World"),
|
|
|
|
Column {
|
|
TextEdit {
|
|
text("Hallo")
|
|
},
|
|
|
|
SpinBox {
|
|
text("Quit"),
|
|
onTextChanged([](const QString &text) { qDebug() << text; })
|
|
},
|
|
|
|
PushButton {
|
|
text("Quit"),
|
|
onClicked([] { QApplication::quit(); })
|
|
},
|
|
}
|
|
};
|
|
|
|
return app.exec(argc, argv);
|
|
}
|