'Popup the menu at `pos` (in screen coordinates). \'Search\' text field
is initialized with `searchText` if provided.'

def popup(self, pos=None, searchText=''):

    if (pos is None):
        pos = QPoint()
    self.__clearCurrentItems()
    self.__search.setText(searchText)
    patt = QRegExp(('(^|\\W)' + searchText))
    patt.setCaseSensitivity(False)
    self.__suggestPage.setFilterRegExp(patt)
    self.ensurePolished()
    if (self.testAttribute(Qt.WA_Resized) and self.sizeGripEnabled()):
        size = self.size()
    else:
        size = self.sizeHint()
    desktop = QApplication.desktop()
    screen_geom = desktop.availableGeometry(pos)
    if (size.height() > screen_geom.height()):
        size.setHeight(screen_geom.height())
    if (size.width() > screen_geom.width()):
        size.setWidth(screen_geom.width())
    geom = QRect(pos, size)
    if (geom.top() < screen_geom.top()):
        geom.setTop(screen_geom.top())
    if (geom.left() < screen_geom.left()):
        geom.setLeft(screen_geom.left())
    bottom_margin = (screen_geom.bottom() - geom.bottom())
    right_margin = (screen_geom.right() - geom.right())
    if (bottom_margin < 0):
        geom.translate(0, bottom_margin)
    if (right_margin < 0):
        geom.translate((- size.width()), 0)
    self.setGeometry(geom)
    self.show()
    self.setFocusProxy(self.__search)
