Originally Posted by Alina
This method do exist, I assure you:
http://doc.trolltech.com/4.1/qtreewi...ml#currentItem
PS. yogeshm02, I think here there is need to reformat the example code to more suitable kind.
Originally Posted by Alina
This method do exist, I assure you:
http://doc.trolltech.com/4.1/qtreewi...ml#currentItem
PS. yogeshm02, I think here there is need to reformat the example code to more suitable kind.
Do not just try to use the code given by me. Try to understand what is being done, and then you would have no questions.Refer to qt docs.
I wanted to pack-up in as few lines as possible.Originally Posted by Mad Max
![]()
Thank your help !Originally Posted by yogeshm02
now I know your code about how to delete a treewidgetitem. but now my question is
how can I get the treewidgetitem which the mouse has clicked?
I just want to realize the follow operation: click a treewidgetitem and then press a delete button to delete the clicked item.
You can sublass QTreeWidget and reinplement keyPressEvent ( QKeyEvent * )
![]()
or..try use eventFilter() for main widget
a life without programming is like an empty bottle![]()
Bookmarks