[Qt-interest] QTextEdit: display all text without scroll bars ?
Andre Somers
andre at familiesomers.nl
Mon May 17 15:23:29 CEST 2010
On 17-5-2010 14:32, Stephen Collyer wrote:
> Is it possible to have a QTextEdit which:
>
> a) always displays all of its text and
> b) never displays scroll bars
>
> under any kind of resizing ? I've been unable to do this, with
> just about every combination of size policy and size hints that
> I can think of.
This is not possible with QTextEdit. At least, not directly. For an
editor, I'm not sure how useful it would be either. Without thinking
about it much, three approaches pop into my head:
1) QGraphicsView provides the zoom support you are after. Perhaps you
can leverage this?
2) Could a QWebView provide what you want, or do you actually need editing?
3) If you don't need editing, perhaps you can render your QTextDocument
to an image, and then scale and display that?
André
More information about the Qt-interest-old
mailing list