mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:42:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			586 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			586 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #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 = GWindow::construct();
 | |
|     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();
 | |
| }
 | 
