File: ApplicationSetup.hpp

package info (click to toggle)
qnodeeditor 2.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,144 kB
  • sloc: cpp: 8,823; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once
#include <QApplication>
#include <memory>
inline std::unique_ptr<QApplication> applicationSetup()
{
    static int Argc = 0;
    static char ArgvVal = '\0';
    static char *ArgvValPtr = &ArgvVal;
    static char **Argv = &ArgvValPtr;
    auto app = std::make_unique<QApplication>(Argc, Argv);
    app->setAttribute(Qt::AA_Use96Dpi, true);
    return app;
}