From 94afc937e1973cd45a189a17190f636b22a3842c Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 1 May 2012 14:08:24 +1000 Subject: [PATCH] Update Screen documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Task-Number: QTBUG-25031 Change-Id: Ie27b42417d63d50769eedcf1f760405861f439e5 Reviewed-by: Samuel Rødal --- src/quick/items/qquickscreen.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp index 280a06c..2c8bf01 100644 --- a/src/quick/items/qquickscreen.cpp +++ b/src/quick/items/qquickscreen.cpp @@ -54,14 +54,17 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Window 2 \brief The Screen attached object provides information about the Screen an Item is displayed on. - The Screen attached object is only valid inside Item or Item derived elements. Inside these elements - it refers to the screen that the element is currently being displayed on. + The Screen attached object is only valid inside Item or Item derived elements, after component completion. + Inside these elements it refers to the screen that the element is currently being displayed on. To use this element, you will need to import the module with the following line: \code import QtQuick.Window 2.0 \endcode + Note that the Screen element is not valid at Component.onCompleted, because the Item has not been displayed on + a screen by this time. + Restricting this import will allow you to have a QML environment without access to window system features. */ -- 1.7.2.5