Thread: Editor widget
View Single Post
Old 02-03-2014, 09:58 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,440
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just create the widget and add it to your dialog, just like you would any other Qt widget. But note that the widget will be only the textedit, it will not include the buttons in the toolbar and so on. For those you have to use editor/widget.py (see the launch_editor()) function, however, editor/widget.py is not suitable for inclusion in other code as it depends on the infrastructure from edit book to handle keyboard shortcuts and various actions.
kovidgoyal is offline   Reply With Quote