소스 검색

Show the resolution of the app, not the size of the screen it is running
on (or not)

Change-Id: I8fd28cfa567b5bcd49373f7400dfc366adf80b6d

Donald Carr 8 년 전
부모
커밋
8f015d9b3f
2개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      qml/widgets/Resolution.qml
  2. 0 1
      src/main.cpp

+ 1 - 1
qml/widgets/Resolution.qml

@@ -1,5 +1,5 @@
 import QtQuick 2.6
 
 Widget {
-    text: screenSize.width + "x" + screenSize.height
+    text: appWindow.width + "x" + appWindow.height
 }

+ 0 - 1
src/main.cpp

@@ -88,7 +88,6 @@ int main(int argc, char *argv[])
     qmlRegisterType<PictureModel>("PictureModel", 1, 0, "PictureModel");
 
     engine.addImportPath("qrc:/");
-    engine.rootContext()->setContextProperty("screenSize", app.screens().at(0)->availableSize());
     engine.rootContext()->setContextProperty("fileReader", new FileReader(&app));
     engine.rootContext()->setContextProperty("nativeHelper", new HelperFunctions(&app));
     engine.load(QUrl(QStringLiteral("qrc:/main.qml")));