Use material style on android

This commit is contained in:
Tobias Fella 2020-08-17 20:21:56 +02:00
parent db30f159c4
commit b412325219
2 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,7 @@ set(alligator_SRCS
kconfig_add_kcfg_files(alligator_SRCS alligatorsettings.kcfgc GENERATE_MOC) kconfig_add_kcfg_files(alligator_SRCS alligatorsettings.kcfgc GENERATE_MOC)
add_executable(alligator ${alligator_SRCS}) add_executable(alligator ${alligator_SRCS})
target_link_libraries(alligator PRIVATE Qt5::Core Qt5::Qml Qt5::Quick Qt5::Sql KF5::Syndication KF5::CoreAddons KF5::ConfigGui KF5::I18n) target_link_libraries(alligator PRIVATE Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Sql KF5::Syndication KF5::CoreAddons KF5::ConfigGui KF5::I18n)
if(ANDROID) if(ANDROID)
target_link_libraries(alligator PRIVATE target_link_libraries(alligator PRIVATE

View File

@ -14,6 +14,7 @@
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include <QQuickView> #include <QQuickView>
#include <QQuickStyle>
#include <KAboutData> #include <KAboutData>
#include <KLocalizedContext> #include <KLocalizedContext>
@ -32,6 +33,7 @@ int main(int argc, char *argv[])
{ {
#ifdef Q_OS_ANDROID #ifdef Q_OS_ANDROID
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
QQuickStyle::setStyle(QStringLiteral("Material"));
#else #else
QApplication app(argc, argv); QApplication app(argc, argv);
#endif #endif