Hi all,
I am having an listview filled with the items, by default the 0th item will be selected. If I try to navigate the list using mobile keypad its not gaining focus, instead i need to use my mobile select key for focus. In this process my mobile left soft key gets change do “Done” I don’t know why this “Done” menu is appearing in my mobile soft Key..
How to provide default focus to listview? And how to avoid display of “Done” at left soft key. Here is the peace of sample code,
#include "Test_Doco.h"
#include <QtGui>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QListView *listui = new QListView();
listui->setSelectionMode(QAbstractItemView::SingleSelection);
listui->viewport()->setFocusPolicy(Qt::WheelFocus);
listui->viewport()->setFocus();
QStandardItemModel* listModel = new QStandardItemModel();
for(int i =0; i<10;i++)
{
QStandardItem *item1 = new QStandardItem("AOL");
listModel->appendRow(item1);
}
QModelIndex index = listModel->index(0,0);
listui->setCurrentIndex(index);
listui->setModel(listModel);
listui->showMaximized();
return a.exec();
}
i have updated the code, please check it