When you do this:
QDir::current().absoluteFilePath(QString::fromStdString(url))
You are asking QDir
(that doesn't know what an url is), to get the filepath of the file index.html#29082013
, which of course doesn't exist.
The solution is to first get the filepath from index.html
, then get an url from it, and only then add the hash #29082013
. Try this:
QString filename = QString(sDir) + ui->pageComboBox->currentText() + ".html";
QUrl urlWithoutHash = QUrl::fromLocalFile(QDir::current().absoluteFilePath(filename));
ui->logView->load(urlWithoutHash.toString() + showAt);