title: PyQt LineEdit with readline completer?
body: <p>I've been working on a command line tool for which I'm now making a PyQT GUI.  I'd like to take my current autocomplete implementation using the readline module, and put that in a QLineEdit text box.  Is this possible?  Do you have any recommendations?</p>
  
  <p>Here's an example of the stuff I'm doing with the readline module:</p>
  
  <pre><code>import readline
  
  values = ['these','are','my','autocomplete','words']
  completions = {}
  
  def completer(text,state):
      try:
          matches = completions[text]
      except KeyError:
          matches = [value for value in values if text.upper() in value.upper()]
          completions[text] = matches
      try:
          return matches[state]
      except IndexError:
          return None
  
  readline.set_completer(completer)
  readline.parse_and_bind('tab: menu-complete')
  
  whie 1:
      text = raw_input('&gt; ')
      text.dostuff()
  </code></pre>
  
  <p>Ultimately, if I can't get the readline module to work in a QLineEdit widget, what I'd ultimately like to do is complete on a list of words, with the ability to have multiple words separated by symbols like +-*/() etc...</p>
  
  <p>Thanks!</p>