1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Demos: Add a HelloWorld2 demo.

This is a simple test app with its UI generated from a VisualBuilder form.
The name is probably silly, but who cares. :^)
This commit is contained in:
Andreas Kling 2019-07-10 21:13:29 +02:00
parent b3d431e390
commit 0bf5c6fa3a
6 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#include <LibGUI/GApplication.h>
#include <LibGUI/GBoxLayout.h>
#include <LibGUI/GButton.h>
#include <LibGUI/GLabel.h>
#include <LibGUI/GWidget.h>
#include <LibGUI/GWindow.h>
#include "UI_HelloWorld2.h"
int main(int argc, char** argv)
{
GApplication app(argc, argv);
auto* window = new GWindow;
window->set_rect(100, 100, 240, 160);
window->set_title("Hello World!");
auto* ui = new UI_HelloWorld2;
window->set_main_widget(ui->main_widget);
ui->w3->on_click = [&](auto&) {
app.quit();
};
window->show();
return app.exec();
}