diff --git a/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp b/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
index fdb41c40f7a..7ef01db7520 100644
--- a/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
+++ b/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
@@ -200,7 +200,9 @@ QString ResourcePreviewHoverHandler::makeTooltip() const
if (mimeType.name().startsWith("image", Qt::CaseInsensitive))
ret += QString("
").arg(m_resPath);
- ret += QString("%2").arg(m_resPath).arg(m_resPath);
+ ret += QString("%2")
+ .arg(m_resPath)
+ .arg(QDir::toNativeSeparators(m_resPath));
}
return ret;
}