-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (24 loc) · 774 Bytes
/
main.cpp
File metadata and controls
32 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
This file is part of ef.qt.
Copyright (C) 2019 ClassicOldSong
Copyright (C) 2019 ReimuNotMoe
This program is free software: you can redistribute it and/or modify
it under the terms of the MIT License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <QApplication>
#include "ef.hpp"
int main(int argc, char **argv) {
QApplication app(argc, argv);
auto mw = new ef::ui::MainWindow;
mw->$methods.text_changed = [](ef::ui::MainWindow& state, const QString& str){
if (str.isEmpty())
state.$data.name = "World";
else
state.$data.name = str;
};
mw->show();
return app.exec();
}