Refreshes the query results based on the tree's query.

def refreshQueryRecords(self):
        """
        Refreshes the query results based on the tree's query.
        """
        if self._recordSet is not None:
            records = RecordSet(self._recordSet)
        elif self.tableType():
            records = self.tableType().select()
        else:
            return
        
        records.setDatabase(self.database())
        
        # replace the base query with this widget
        if self.queryAction() == XOrbTreeWidget.QueryAction.Replace:
            if self.query():
                records.setQuery(self.query())
            else:
                records.setQuery(None)
        
        # join together the query for this widget
        elif self.queryAction() == XOrbTreeWidget.QueryAction.Join:
            if records.query():
                records.setQuery(self.query() & self.query())
            elif self.query():
                records.setQuery(self.query())
            else:
                records.setQuery(None)
        
        self._recordSet = records
        
        if not self.signalsBlocked():
            self.queryChanged.emit()
            self.recordsChanged.emit()