Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1021

QHelpSearchEngine cannot read results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None
    • Environment:
      Gentoo GNU/Linux amd64 (x86_64)
    • Platform/s:
      Linux/X11

      Description

      The initialization section looks like this:

       

      class Help(QMainWindow):
      
      def __init__(self , parent = None):
       super(Help , self).__init__(parent)
      
       ui_file = QFile('Gui/general.ui')
       ui_file.open(QFile.ReadOnly)
      
       loader = QUiLoader()
       self.window = loader.load(ui_file)
       ui_file.close()
      
       # Store parent
       self.parent = parent
      
       # Build help engine
       self.helpEngine = QHelpEngine('/home/stefano/PycharmProjects/designtool/help/help.qhc')
       self.helpEngine.setupData()
       self.helpEngine.searchEngine().reindexDocumentation()
      
       #self.searchEngine = self.helpEngine.searchEngine()
       self.searchEngine = QHelpSearchEngine(self.helpEngine , self)
       self.searchEngine.reindexDocumentation()
      
      # ...
      
       # When search button is clicked start search
       self.searchEngine.queryWidget().search.connect(self.searchInit)
      
       # When searching is finished, retrieve results
       self.searchEngine.searchingFinished.connect(self.searchRetrieveResults)

       

       And the two handlers are as follows:

      def searchInit(self):
              # User input
              #self.param = self.searchEngine.queryWidget().searchInput()
      
              #pprint.pprint(self.param)
      
              # Search for results
              # search = self.searchEngine.resultsWidget().search(param)
              #self.searchEngine.search(self.param)
      
              #pprint.pprint('Searched for ' + self.searchEngine.searchInput())
      
              q = self.searchEngine.queryWidget().query()
              self.searchEngine.search(q);
      
      def searchRetrieveResults(self):
              # Widgets
              queryWidget = self.searchEngine.queryWidget()
              resultsWidget = self.searchEngine.resultWidget()
      
              count = self.searchEngine.searchResultCount()
      
              pprint.pprint('Results found: ' + str(count))
      
              results = self.searchEngine.searchResults(0 , count)
      
              pprint.pprint(results)
      

      And if I click on "search" and wait for the response of the program, I get this output:
      'Results found: 4'
      [None, None, None, None]

      Any idea what is going on?

      I get also the following warning. I couldn't find many results on Google with this specific issue.
      RuntimeWarning: CopyCppToPython(): SbkConverter::copyToPython is null for "PySide2.QtHelp.QHelpSearchResult".

        Attachments

        1. qhelpengine.tar.gz
          71 kB
        2. qhelpengine.tar.gz
          71 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              luckylinux Stefano R.
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes