December 13, 2010

mario mario
Lab Rat
240 posts

[Solved] Vertical ListView in horizontal ListView

 

I wonder if there are any nice solutions to my problem?

For example:

I have a horizontal ListView which contains vertical ListViews, one for each day of the week. There’s no problem panning the vertical ListView for one day but I’m not able to pan to another day since it seems that the vertical ListView eats the horizontal panning gestures.

Any ideas?

4 replies

December 14, 2010

jech jech
Lab Rat
73 posts

I was solving the same problem as you and it works for me. Please see this topic. [developer.qt.nokia.com]

December 15, 2010

mario mario
Lab Rat
240 posts

I solved it!

In my delegate I had:

  1.     ListView { id: view; ... }
  2.  
  3.     Component {
  4.         id: dayDelegate
  5.  
  6.         Item {
  7.             id: wrapper
  8.             width: parent.width
  9.             height: parent.height
  10.             ...

but I should have used:

  1.     ListView { id: view; ... }
  2.  
  3.     Component {
  4.         id: dayDelegate
  5.  
  6.         Item {
  7.             id: wrapper
  8.             width: view.width
  9.             height: view.height
  10.             ...

In other words, I have to use the id of the list view and not parent.

October 20, 2011

Hassan Kassem Hassan Kassem
Lab Rat
7 posts

can you flick now in two directions ( horizontal and vertical)?

October 20, 2011

jech jech
Lab Rat
73 posts

Yes, it works for me.

 
  ‹‹ How to extend the JavaScript environment in QML, reading a text file from js?      Transparency of Flickable (and Border Merge) ››

You must log in to post a reply. Not a member yet? Register here!