summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-06-17 11:54:16 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-06-17 11:54:16 (GMT)
commit2b39081bf101e53a70ff056d527dc3dfb8208bf0 (patch)
treea8e57489e18dbdd620b8880eda5c8e2d77049a07 /examples
parent5e1112ec04dcef671700e326186ca56b790f7e08 (diff)
parentc390312f8fbea14ac4df0c5185ca814054f448d8 (diff)
downloadQt-2b39081bf101e53a70ff056d527dc3dfb8208bf0.zip
Qt-2b39081bf101e53a70ff056d527dc3dfb8208bf0.tar.gz
Qt-2b39081bf101e53a70ff056d527dc3dfb8208bf0.tar.bz2
Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qt
Conflicts: doc/src/declarative/righttoleft.qdoc examples/draganddrop/fridgemagnets/main.cpp examples/script/context2d/main.cpp
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml2
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml2
-rw-r--r--examples/declarative/righttoleft/layoutdirection/layoutdirection.qml12
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp7
-rw-r--r--examples/script/context2d/main.cpp9
-rw-r--r--examples/widgets/wiggly/main.cpp4
6 files changed, 26 insertions, 10 deletions
diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index f3894fb..224d38b 100644
--- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
@@ -86,7 +86,7 @@ FocusScope {
hoverEnabled: true
onClicked: {
- GridView.view.currentIndex = index
+ container.GridView.view.currentIndex = index
container.forceActiveFocus()
}
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
index 88c3624..8f9d022 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
@@ -68,7 +68,7 @@ Item {
hoverEnabled: true
onClicked: {
- ListView.view.currentIndex = index
+ container.ListView.view.currentIndex = index
container.forceActiveFocus()
}
}
diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml b/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
index 3044430..fa343b9 100644
--- a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
+++ b/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
@@ -226,7 +226,17 @@ Rectangle {
Component {
id: viewDelegate
Item {
- width: (listView.effectiveLayoutDirection == Qt.LeftToRight ? (index == 48 - 1) : (index == 0)) ? 40 : 50
+ function effectiveLayoutDirection() {
+ if (LayoutMirroring.enabled)
+ if (listView.layoutDirection == Qt.LeftToRight)
+ return Qt.RightToLeft;
+ else
+ return Qt.LeftToRight;
+ else
+ return listView.layoutDirection;
+ }
+
+ width: (effectiveLayoutDirection() == Qt.LeftToRight ? (index == 48 - 1) : (index == 0)) ? 40 : 50
Rectangle {
width: 40; height: 40
color: Qt.rgba(0.5+(48 - index)*Math.random()/48,
diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp
index 623e6d2..011440b 100644
--- a/examples/draganddrop/fridgemagnets/main.cpp
+++ b/examples/draganddrop/fridgemagnets/main.cpp
@@ -51,15 +51,16 @@ int main(int argc, char *argv[])
#endif
DragWidget window;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- window.showMaximized();
+#ifdef Q_OS_SYMBIAN
+ bool smallScreen = true;
#else
bool smallScreen = QApplication::arguments().contains("-small-screen");
+#endif
+
if (smallScreen)
window.showFullScreen();
else
window.show();
-#endif
return app.exec();
}
diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp
index b646869..20df178 100644
--- a/examples/script/context2d/main.cpp
+++ b/examples/script/context2d/main.cpp
@@ -48,16 +48,17 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
Window win;
- bool smallScreen = QApplication::arguments().contains("-small-screen");
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- win.showMaximized();
+#ifdef Q_OS_SYMBIAN
+ bool smallScreen = true;
#else
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
+#endif
+
if (!smallScreen) {
win.show();
} else {
win.showFullScreen();
}
-#endif
return app.exec();
}
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
index 0b92228..31e3346 100644
--- a/examples/widgets/wiggly/main.cpp
+++ b/examples/widgets/wiggly/main.cpp
@@ -45,7 +45,11 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+#ifdef Q_OS_SYMBIAN
+ bool smallScreen = true;
+#else
bool smallScreen = QApplication::arguments().contains("-small-screen");
+#endif
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_HILDON) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
smallScreen = true;