Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot open .qhc files in QWebView
QtWS25 Last Chance

Cannot open .qhc files in QWebView

Scheduled Pinned Locked Moved General and Desktop
qthelpqwebviewqhelpengine
2 Posts 1 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ValentinMicheletV Offline
    ValentinMicheletV Offline
    ValentinMichelet
    wrote on last edited by ValentinMichelet
    #1

    Hi everyone.

    I have to implement an embedded help in an application, using .qhc and .qch files generated from Doxygen.

    I successfully managed to open the .qch via Qt Assistant, meaning this file is correctly built.

    Now I would like to display the documentation, using QHelpEngine.

    // QHelpEngine
    m_helpEngine = new QHelpEngine("absolute_path_to_doc_folder/doc.qhc");
    if (m_helpEngine->setupData() == false)
    {
       qDebug() << m_helpEngine->error();
    }
    

    I implemented the index and content widgets, using signals and slots to handle links opening. But when I click on an index or on a content, the page is always blank. The only way I found to display the documentation correctly is to have a directory that contains the HTML/CSS/picture files generated by Doxygen. With a simple trick, I replace 'qch' with 'html' in url when loaded and then I can see the documentation.

    Yet, Qt Assistant doesn't need this to display correctly the documentation, and on top of that, from only a .qch file.

    I looked at the source code of Qt Creator in order to find what they did that I don't, but I found nothing relevant there.

    Does anyone know how to create a help widget that displays documentation from only a .qch and a .qhc files?

    There is really few documentation about embedding help in an application, so any hint would be greatly appreciated. Thanks in advance.

    1 Reply Last reply
    0
    • ValentinMicheletV Offline
      ValentinMicheletV Offline
      ValentinMichelet
      wrote on last edited by
      #2

      I updated my previous post since I solved part of the issue.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved