diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-19 14:22:29 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-19 16:51:21 +0300 |
commit | eaa6623d1b82982509b8f5f51a44205a3d5f9b5f (patch) | |
tree | 038ecbba485c46ffda18055227009350dc01dc20 /src/about/test/main.cpp | |
parent | Add args.wrap (diff) | |
download | smolbote-eaa6623d1b82982509b8f5f51a44205a3d5f9b5f.tar.xz |
move lib/about to src/about
- add AboutDialog test
- add SVG icon in place of application icon
Diffstat (limited to 'src/about/test/main.cpp')
-rw-r--r-- | src/about/test/main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/about/test/main.cpp b/src/about/test/main.cpp new file mode 100644 index 0000000..18037e1 --- /dev/null +++ b/src/about/test/main.cpp @@ -0,0 +1,21 @@ +#include <QApplication> +#include <QTimer> +#include "aboutdialog.h" + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + app.setApplicationName("about"); + app.setApplicationVersion("1.2.3"); + + AboutDialog dlg; + QObject::connect(&dlg, &AboutDialog::finished, &app, &QApplication::quit); + dlg.show(); + + if(qEnvironmentVariableIsSet("autoclose")) { + QTimer::singleShot(200, &dlg, &AboutDialog::accept); + } + + return app.exec(); +} + |