Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87337

QHelp documentation example code is wrong

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.15.0, 5.15.1
    • GUI: Look'n'Feel
    • None
    • All

    Description

      The example code at end of page https://doc.qt.io/qt-5/qthelp-framework.html should be:

      QHelpEngineCore helpEngine("mycollection.qhc");
      helpEngine.setUsesFilterEngine(true);
      
      ...
      
      // get all file references for the identifier
      QList<QHelpLink> links =
          helpEngine.documentsForIdentifier(QLatin1String("MyDialog::ChangeButton"));
      
      // If help is available for this keyword, get the help data
      // of the first file reference.
      >;if (links.count()) {
          QByteArray helpData = helpEngine->fileData(links.cbegin()->url);
          // show the documentation to the user
          if (!helpData.isEmpty())
              displayHelp(helpData);
      }
      
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            viniciusjl Vinicius J Latorre
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes