qtmobility/examples/keepintouch/addressfinder.cpp
changeset 8 71781823f776
parent 5 453da2cfceef
child 11 06b8e2af4411
--- a/qtmobility/examples/keepintouch/addressfinder.cpp	Fri May 14 16:41:33 2010 +0300
+++ b/qtmobility/examples/keepintouch/addressfinder.cpp	Thu May 27 13:42:11 2010 +0300
@@ -385,10 +385,10 @@
     connect(tabWidget,SIGNAL(currentChanged(int)),this,SLOT(tabChanged(int)));
 #else
     QWidget* centralWidget = new QWidget(this);
-    QScrollArea* sa = new QScrollArea(this);
-    sa->setWidget(centralWidget);
-    sa->setWidgetResizable(true);
-    setCentralWidget(sa);
+    QScrollArea* scrollArea = new QScrollArea(this);
+    scrollArea->setWidget(centralWidget);
+    scrollArea->setWidgetResizable(true);
+    setCentralWidget(scrollArea);
     QVBoxLayout* centralLayout = new QVBoxLayout(centralWidget);
 #endif
 
@@ -503,6 +503,26 @@
 #ifndef USE_SEARCH_BUTTON
     tabChanged(0);
 #endif
+
+    QWidgetList focusableWidgets;
+    focusableWidgets << excludeCheckBox
+                     << includePeriod
+                     << excludePeriod
+                     << contactList
+                     << messageCombo
+                     << showButton
+#ifndef USE_SEARCH_BUTTON
+                     << tabWidget
+#else
+                     << searchButton
+                     << scrollArea
+#endif
+                     << forwardButton;
+
+  foreach(QWidget* w, focusableWidgets)
+       w->setContextMenuPolicy(Qt::NoContextMenu);
+
+    excludePeriod->setFocus();
 }
 
 void AddressFinder::setSearchActionEnabled(bool val)