summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-05-20 03:43:22 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-05-20 04:11:51 (GMT)
commit91251b69edd966965bf7944aec642321c362af2a (patch)
tree1a377a8a9ea571416a2676e4cebdcfdbcd97e4f5 /examples
parentc37a7442d298ccec251b9178a31b1f0c8f199676 (diff)
downloadQt-91251b69edd966965bf7944aec642321c362af2a.zip
Qt-91251b69edd966965bf7944aec642321c362af2a.tar.gz
Qt-91251b69edd966965bf7944aec642321c362af2a.tar.bz2
Fixes for docs, example code
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp2
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro5
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml12
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp2
4 files changed, 10 insertions, 11 deletions
diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
index 4ecbb5c..fac36ff 100644
--- a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
@@ -49,7 +49,7 @@
/*
- This example illustrates using a QNetworkAccessManagerFactory to
+ This example illustrates using a QDeclarativeNetworkAccessManagerFactory to
create a QNetworkAccessManager with a proxy.
Usage:
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
index 4a3fc73..c85a400 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
@@ -1,13 +1,8 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Tue May 4 13:36:26 2010
-######################################################################
-
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += declarative
-# Input
SOURCES += main.cpp
RESOURCES += layoutItem.qrc
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
index 460c564..6f91dc9 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
@@ -1,15 +1,17 @@
import Qt 4.7
-LayoutItem {//Sized by the layout
+LayoutItem { //Sized by the layout
id: resizable
+
minimumSize: "100x100"
maximumSize: "300x300"
preferredSize: "100x100"
+
Rectangle { color: "yellow"; anchors.fill: parent }
+
Rectangle {
- width: 100; height: 100;
- anchors.top: parent.top;
- anchors.right: parent.right;
- color: "green";
+ width: 100; height: 100
+ anchors.top: parent.top; anchors.right: parent.right
+ color: "green"
}
}
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
index a104251..47d3a23 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
@@ -53,6 +53,7 @@
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
+
//Set up a graphics scene with a QGraphicsWidget and Layout
QGraphicsView view;
QGraphicsScene scene;
@@ -61,6 +62,7 @@ int main(int argc, char* argv[])
widget->setLayout(layout);
scene.addItem(widget);
view.setScene(&scene);
+
//Add the QML snippet into the layout
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml"));