PDA

View Full Version : Qt 4.4.0 Help Module : Search not working



Ankitha Varsha
22nd May 2008, 09:45
Hi,

I am working on Qt4.4.0's help module.
I am creating help for my application using .qhc file and QHelpEngine and other classes provided by qt help module.

"Index" tab works properly and I am displaying html/url in the textbrowser when a link is clicked in HelpIndexWidget.

But I am not able use the search feature. I have done following to achieve the search.

1.
helpSearchEngine = helpEngine->searchEngine();

And I have used helpSearchEngine's query widget and result widgets to show the search query and results in a docked tab.

2. Made follwoing connection


connect(helpSearchEngine->queryWidget(), SIGNAL(search()),
this, SLOT(slotSendQuery()));

Note : search signal is emitted when one enters the search string and hits search button.

slotSendQuery looks like this:
This function passes this query list to helpSeachEngine's search function where actual search happens.


void slotSendQuery
{
QList<QHelpSearchQuery> queryList = helpSearchEngine->queryWidget()->query();
helpSearchEngine->search(queryList);
}

But, the number of hits after search of helpseachengine is returned is always zero.
I debugged to make sure that search function of helpSearchEngine is getting correct help collection file.

Is there anything else to be done to implement this search feature in qt help module?

Have anyone worked on Qt Help Module yet???
Please respond.

Thanks.