PDA

View Full Version : Multi Widget focus problem with QListView in s60



ericleopard
11th July 2011, 04:29
Hello,Everyone:

I am a newbie guy in QT development, and now i face a problem which frustrated me a few days.

I use QT s60 version for E6/E7. The application is actually a totally full screen app, and i use the QTabWidget and QListView class for my most of widgets.

I descripted the widget flow like this:

mainWindows->QTabWidget->QWidget1(contain a QListView)
->QWidget2(contain a QListView)
->QWidget3(contain a QListView)
Each time when click a item in QListView, it will show a full screen QWidget above, it can also return to the root Tab Widget by a QPushButton.

Now the problem is:
This app must support keyboard event and touch event, the touch event work perfert, but the keyboard focus event works very weird, i only use the up/down/left/right/select key to navigate between each widget and item.

1. I set focusPolicy value StrongFocus for all the needed widget included the QListView.
2. When I set all the new full screen widget as the child of the last one, This new widget will be hard to be focued and weird, i mean the parent widget is always in the focus chain, but i want the new full screen own its focus chain,that means modal.
By the way i also use setTabOrder and set focus to the new one, it does not work.
3. When I set all the full screen widget as the model, which means it is a new windows, the focus chain can cycle well in this new windows, but it display weird, it will own a flash black screen time when switch between 2 widgets.


I perfer to use the child/parent method to switch between every widget, but i want to the child widget own his cycle widget in itself, How can i achieve that target.

Thanks anyway.

(The navigation widget in iphone is a good example)