You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, February 4th 2010, 11:29am

Text Edit

For my application, i have to create the text box with multi line support. Hence i have a doubt that whether i should use the Text Edit Widget or Plain Text Edit Widget? What is difference between those?

Please anyone help me.

nisavid

Beginner

  • "nisavid" is male

Posts: 27

Location: MA, USA

Occupation: Software developer

  • Send private message

2

Thursday, February 4th 2010, 5:08pm

From the QPlainTextEdit documentation: "QPlainText uses very much the same technology and concepts as QTextEdit, but is optimized for plain text handling." See also the QTextEdit documentation.

3

Friday, February 5th 2010, 1:00am

I too am curious about how to use QTextedit and QPlaintextEdit. I've been going through the documentation and some parts seem opaque.

In particular, the codeeditor example seems to take the blocknumber to be the line number. Yet the QPlaintextEdit only talks about paragraphs, it doesn't make it clear that a line of text is going to be always equal to a paragraph but seems to be the default behavior.

Some clarification on this would be great. Especially since, in my web searches, I get the impression that it is a challenge to get line numbers in the Qtextedit class in the QT4 controls that replaced the QT3 textedit. Still, I hope some standard solution has appeared at this point.