[Qgis-developer] Command line history for Python console

volkan kepoglu vkepoglu at gmail.com
Fri Oct 24 10:19:35 EDT 2008


Dear Martin,

I can suggest python codes for this issue. if QtWidget is QLineEdit in
python console, you can use this code:

txtEnter = QLineEdit

  def keyPressEvent(self, event):
    if event.key() == QtCore.Qt.Key_Up:
      self.txtEnter.undo()
      self.txtEnter.deselect()
    elif event.key() == QtCore.Qt.Key_Down:
      self.txtEnter.redo()
      self.txtEnter.deselect()

I hope it works.

-- 
Regards,
Volkan Kepoglu
PhD Candidate
GGIT Department in METU,
Ankara, Turkey.


More information about the Qgis-developer mailing list