1
0
Fork 0
phizclip-desktop-demo/examples/qt/demo/main.cpp

29 lines
910 B
C++
Raw Normal View History

2022-04-18 12:05:21 +08:00
#include "finclip-qt-demo.h"
#include "finclip_api.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
2022-09-22 16:52:19 +08:00
std::string appkey = "";
std::string secret = "";
std::string domain = "";
std::string app_store = "1";
2022-04-18 12:05:21 +08:00
2022-09-22 16:52:19 +08:00
auto *factory = finclip_get_packer_factory();
auto *packer = finclip_packer_factory_get_config_packer(factory);
finclip_initialize(packer);
FinclipParams *config = finclip_create_params();
finclip_params_set(config, FINCLIP_CONFIG_APPSTORE, "1");
finclip_params_set(config, FINCLIP_CONFIG_APPKEY, appkey.c_str());
finclip_params_set(config, FINCLIP_CONFIG_SECRET, secret.c_str());
finclip_params_set(config, FINCLIP_CONFIG_DOMAIN, domain.c_str());
2022-04-18 12:05:21 +08:00
finclip_config_packer_add_config(packer, config);
2022-09-22 16:52:19 +08:00
finclip_start_applet(app_store.c_str(), "");
2022-04-18 12:05:21 +08:00
FinclipQtDemo w;
w.show();
return a.exec();
}