April 27, 2012

ludde ludde
Lab Rat
325 posts

PathView currentItem

 

For some reason PathView in QML 1.1 does not have a currentItem property (like ListView and GridView do).
(It has been added in 2.0, but that does not help me right now…)
Can someone think of a workaround to this?
I want to display a role value outside the delegate, and was planning to make the role available as a property of the delegate. But that is useless if I cannot get hold of the current item.

1 reply

April 27, 2012

task_struct task_struct
Ant Farmer
349 posts

Hello,

may be you can use http://doc.qt.nokia.com/4.7-snapshot/qml-pathview.html#isCurrentItem-prop When it changes to true, call some function to get role and set it to other element that is outside delegate.

Also see this example [qt-project.org]

 Signature 

“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds

 
  ‹‹ How to get the 3D coordinates of mouse position in Quick3D?      QML syntax for QVariantMaps? ››

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