diff options
Diffstat (limited to 'basicsuite/shared/main.cpp')
-rw-r--r-- | basicsuite/shared/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 808d5df..d33b09c 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -25,6 +25,9 @@ #include <QtGui/QPalette> #include <QtCore/QRegExp> +#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) +#include <QtQuick/QQuickItem> +#endif #include <QtQuick/QQuickView> #include <QtQml/QQmlEngine> @@ -57,10 +60,10 @@ int main(int argc, char **argv) excludeFile.close(); } - QString fontName = QStringLiteral("/system/lib/fonts/OpenSans-Regular.ttf"); + QString fontName = QStringLiteral("/system/lib/fonts/DejaVuSans.ttf"); if (QFile::exists(fontName)) { QFontDatabase::addApplicationFont(fontName); - QFont font("Open Sans"); + QFont font("DejaVu Sans"); font.setPixelSize(12); QGuiApplication::setFont(font); } else { @@ -70,6 +73,11 @@ int main(int argc, char **argv) } QQuickView view; +#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) + // Ensure the width and height are valid because of QTBUG-36938. + QObject::connect(&view, SIGNAL(widthChanged(int)), view.contentItem(), SLOT(setWidth(int))); + QObject::connect(&view, SIGNAL(heightChanged(int)), view.contentItem(), SLOT(setHeight(int))); +#endif DummyEngine engine; view.rootContext()->setContextProperty("engine", &engine); |