blob: 40b563c304950a7ab032f6903cd26b1be299a51e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <QApplication>
#include "profileeditorplugin.h"
#include <QDialog>
#include <QTimer>
#include <QWebEngineProfile>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
ProfileEditorPlugin plugin;
auto *dlg = dynamic_cast<ProfileDialog*>(plugin.createWidget(nullptr));
const auto i = dlg->addProfile("id", "testing", new QWebEngineProfile, new QSettings(QString(), QSettings::IniFormat, &app));
dlg->show();
if(qEnvironmentVariableIsSet("autoclose")) {
dlg->showProfile(i);
QTimer::singleShot(200, dlg, &QDialog::accept);
}
return app.exec();
}
|