traversing tree using mouse clicks
Hi I am very much new to Qt frame. one reason i need to program in Qt is due to project requirements :( and the other is due to my love for open source movement :)
presently i need to show some data in a tree view. i used the simple tree model example code. i work on solaris 10.
but the project requirement demands the tree traversal using mouse clicks.
i will be great full if some body can send some code snippets which i can plug into the main stream with minor tweakings. thanks in advance.
also i want to know how is there any function to give intelligence for the fetching the model index of its level?
regards,
krishna.
Re: traversing tree using mouse clicks
What do you mean by "traversal using mouse clicks"?
And what kind of intelligence do you mean? Could you provide more details?
Re: traversing tree using mouse clicks
Thanks for the reply. i mean that if i double click or right click on any one of the rows how should the current row know that it has to fetch and display a particular column.
Also how to display a image before a row. i already have seen some similar query but was unable to comprehend it well.
Re: traversing tree using mouse clicks
Quote:
Originally Posted by
krishna.bv
Thanks for the reply. i mean that if i double click or right click on any one of the rows how should the current row know that it has to fetch and display a particular column.
Connect to the doubleClicked() signal of your tree.
Quote:
Also how to display a image before a row.
Set the image as the Qt::DecorationRole data piece for the item.