I tried to use the quickly.widgets.text_editor class in a quickly project just now (as in one of the highlighted quickly tutorials) and got an import error. When I tried to inspect the quickly.widgets module I got an import error. Does quickly still include its own widgets? Does it still include the text_editor widget? There doesn't seem to be any coherent API documentation for quickly on the Ubuntu developers site! (Sorry if I'm just missing something obvious.) Thanks.


Sounds like you maybe don't have the quickly-widgets package installed.

sudo apt-get install quickly-widgets

Then, e.g. following this video http://www.youtube.com/watch?v=urwBBlYhaUU&feature=player_embedded, the imports seems to work fine.

As far as docs go, the best I could find is using pythons internal documentation system.

from quickly.widgets import text_editor
print text_editor.__doc__
Module for the TextView widgth wich encapsulates management of TextBuffer
and TextIter for common functionality, such as cut, copy, paste, undo, redo, 
and highlighting of text.

#create the TextEditor and set the text
editor = TextEditor()
editor.text = "Text to add to the editor"

#use cut, works the same for copy, paste, undo, and redo
def __handle_on_cut(self, widget, data=None):

#add string to highlight

#remove highlights

#Configure as a TextView

#Access the Gtk.TextBuffer if needed
buffer = self.editor.get_buffer()

A TextEditor is Gtk.TextView
| improve this answer | |
  • Thanks trent. I somehow missed the fact that the widgets were a separate package. Once I installed it everything worked fine. – monotasker Jul 18 '12 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.