i am trying to create a simple document browser (html) my 'table of contents' or 'index' i implemented using qtreewidget and my html pages are displayed using qtextbrowser. when i click on a qtreewidgetitem i can update the page in qtextbrowser. but when i click on a href link on a page in the qtextbrowser, i cant figure out an easy way to update the qtree to highlight the new page's qtreewidgetitem. is there a simple solution for this or should i be using different widgets? i tried setting qstring data to the qtreewidgetitems and iterating through the items and if the data == the qurl passed from anchorclicked then select the qtreewidgetitem but i couldnt get that to work.

any help greatly appreciated as i am new to qt.