Thanks for this. It was really helpful.
I couldn't get it to work with your syntax for connecting the signal and slot but the code below worked for me. Not sure if something has changed over the years - I am v new to Qt.
connect(contentWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(testSlot()));
void HelpWindow::testSlot()
{
QModelIndex testIndex = mpHelpEngine->contentWidget()->currentIndex();
QHelpContentItem *item = mpHelpEngine->contentModel()->contentItemAt(testIndex);
QUrl testUrl = item->url();
ui->textBrowser->setSource(testUrl);
return;
}
Of course the testSlot function needs to be added to the Slots in the .h file.
Hope this helps someone out there