35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
|
#include "CppUnitTest.h"
|
||
|
#include "MainWindow.h"
|
||
|
#include <QGuiApplication>
|
||
|
#include <QtWidgets/QApplication>
|
||
|
#include <FramelessHelper/Core/private/framelessconfig_p.h>
|
||
|
|
||
|
|
||
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||
|
|
||
|
namespace UnitTest
|
||
|
{
|
||
|
TEST_CLASS(UnitTest)
|
||
|
{
|
||
|
public:
|
||
|
TEST_METHOD(TestMethod1)
|
||
|
{
|
||
|
FRAMELESSHELPER_USE_NAMESPACE
|
||
|
FramelessHelper::Core::initialize();
|
||
|
//QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||
|
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||
|
char arg[] = "";
|
||
|
char* argv[] = { arg };
|
||
|
int argc = 1;
|
||
|
QApplication a(argc, argv);
|
||
|
FramelessHelper::Core::setApplicationOSThemeAware();
|
||
|
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur);
|
||
|
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
||
|
FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow);
|
||
|
MainWindow w;
|
||
|
w.show();
|
||
|
a.exec();
|
||
|
}
|
||
|
};
|
||
|
}
|