Changeset View
Changeset View
Standalone View
Standalone View
kstyle/demo/main.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 46 | { | |||
---|---|---|---|---|---|
49 | #if QT_VERSION >= 0x050200 | 49 | #if QT_VERSION >= 0x050200 | ||
50 | QCommandLineParser commandLine; | 50 | QCommandLineParser commandLine; | ||
51 | QCommandLineOption enableHighDpi( "highdpi", "Enable High DPI pixmaps" ); | 51 | QCommandLineOption enableHighDpi( "highdpi", "Enable High DPI pixmaps" ); | ||
52 | commandLine.addOption( enableHighDpi ); | 52 | commandLine.addOption( enableHighDpi ); | ||
53 | commandLine.process( app ); | 53 | commandLine.process( app ); | ||
54 | 54 | | |||
55 | app.setAttribute( Qt::AA_UseHighDpiPixmaps, commandLine.isSet( enableHighDpi ) ); | 55 | app.setAttribute( Qt::AA_UseHighDpiPixmaps, commandLine.isSet( enableHighDpi ) ); | ||
56 | #endif | 56 | #endif | ||
57 | app.setAttribute(Qt::AA_DontUseNativeMenuBar); | ||||
57 | 58 | | |||
58 | app.setApplicationName( i18n( "Oxygen Demo" ) ); | 59 | app.setApplicationName( i18n( "Oxygen Demo" ) ); | ||
59 | app.setWindowIcon( QIcon::fromTheme( QStringLiteral( "oxygen" ) ) ); | 60 | app.setWindowIcon( QIcon::fromTheme( QStringLiteral( "oxygen" ) ) ); | ||
60 | DemoDialog dialog; | 61 | DemoDialog dialog; | ||
61 | dialog.show(); | 62 | dialog.show(); | ||
62 | bool result = app.exec(); | 63 | bool result = app.exec(); | ||
63 | return result; | 64 | return result; | ||
64 | } | 65 | } | ||
Show All 13 Lines |