mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00

This means that we always have a window and for the C++ API we don't require this ComponentWindow use anymore.
19 lines
405 B
C++
19 lines
405 B
C++
#include "hello.h"
|
|
#include <iostream>
|
|
|
|
int main()
|
|
{
|
|
static Hello component;
|
|
|
|
component.on_foobar([](auto...) { std::cout << "Hello from C++" << std::endl; });
|
|
|
|
component.on_plus_clicked([]() {
|
|
component.set_counter(component.get_counter() + 1);
|
|
});
|
|
|
|
component.on_minus_clicked([]() {
|
|
component.set_counter(component.get_counter() - 1);
|
|
});
|
|
|
|
component.run();
|
|
}
|