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

QHelp documentation example code is wrong

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0, 5.15.1
    • Fix Version/s: None
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            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