From d0078b6574d7022f207f3af492d2d8ec142b9bd1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 5 Feb 2019 09:44:13 +0100 Subject: Clock: Turns the clock window from guitest2 into a separate program. We can't not have a desktop clock app. :^) --- Clock/main.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Clock/main.cpp (limited to 'Clock/main.cpp') diff --git a/Clock/main.cpp b/Clock/main.cpp new file mode 100644 index 0000000000..483d5cc88f --- /dev/null +++ b/Clock/main.cpp @@ -0,0 +1,21 @@ +#include +#include +#include "ClockWidget.h" + +int main(int, char**) +{ + GEventLoop loop; + + auto* window = new GWindow; + window->set_title("Clock"); + window->set_rect({ 100, 100, 100, 40 }); + + auto* clock_widget = new ClockWidget; + clock_widget->set_relative_rect({ 0, 0, 100, 40 }); + window->set_main_widget(clock_widget); + + window->show(); + return loop.exec(); +} + + -- cgit v1.2.3