[PyQt] QTextEdit: Is there a default text edit display?

David Boddie david at boddie.org.uk
Sat Jan 24 01:22:17 GMT 2009


On Fri Jan 23 20:06:04 GMT 2009, Marc Nations wrote:

> I need to use rich text in an application which appears to be utilized
> using QTextEdit. The edit options need to be available in the app. I
> assumed there was an option to pop them up in the widget or in the toolbar
> somewhere, like it does in QtDesigner. However I can't find anything to do
> that. I can build my own actions, of course, but would rather not if I
> don't need to. Is there a way to make the edit options available with
> default buttons?

QTextEdit doesn't expose any actions of its own, so you will have to create
your own. Take a look at the Application example supplied with PyQt (in the
examples/mainwindows/application directory) for code to do this.

Sadly, default icons for actions are apparently not a feature common to all
platforms, so you'll need to find a source of those. Perhaps someone reading
can suggest a good source of suitably-licensed icons.

David


More information about the PyQt mailing list