[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QTextEdit Question
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-12-12 21:00:17
[Download RAW message or body]

H'm, well, it seems that your question is very interesting.

I had thought about QT's example program textedit. The file textedit.cpp in 
the method TextEdit::textStyle seems to do what you want to do. However it 
uses QTextEdit::setParagType to do so and in qtextedit.h, setParagType is 
marked as "do not use, will go away". 

Therefore I have no idea how to correctly do what you intent to do. Sorry!

You might find a better answer than mine on Trolltech's site ( 
http://www.trolltech.com ), especially in the mailing lists archives or ask 
the question directly to one of Trolltech's mailing lists.

Have a nice day/evening/night!

On Thursday 12 December 2002 18:09, Richard Stevens wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> yes, I'm using it in RichText mode already. I couldn't figure out though,
> how to start typing text for a <h1> for example. I couldn't figure out how
> to use all the styles mentioned in the QStyleSheet Docs.
>
> Well, maybe I'll really have to dig through the sources. Let's see, what I
> find ;)
>
> Thanks,
>
> Richard
>
> On Thursday 12 December 2002 16:18, Nicolas Goutte wrote:
> > You know that QTextEdit can already do it if you use
> > QTextEdit::setTextFormat(RichText)
> >
> > But may be I do not understand correctly your problem. (But may be you
> > should look at QTextEdit's source.)
> >
> > Have a nice day/evening/night!
> >
> > On Thursday 12 December 2002 14:43, Richard Stevens wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi,
> > >
> > > I'd like to create a custom TextEditor that allows only a small subset
> > > of HTML entities. Those are things like bold and italic, enumerations
> > > and the different heading levels (<h1><h2>...). As far as I understand
> > > the documentation of QTextEdit, this should be possible to do with
> > > preparing a QStylesheet to be used with QTextEdit. Right?
> > >
> > > The biggest problem I have now is to figure out, how to start editing a
> > > <h1> section for example. Bold, italic and so on are easy but how would
> > > I use other tags? It would be okay to only be able to set <h1> for a
> > > selection.
> > >
> > > Thanks for any help or links.
> > >
> > > Richard
> > >
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.0.7 (GNU/Linux)
> > >
> > > iD8DBQE9+JJ4WQvEMJfcXlQRAruHAJ0e4ut6NO8Y0g542Ib7VXRnXqowDgCfSSXS
> > > U0tRQD9VsrYlu8ccZyBxN68=
> > > =A8py
> > > -----END PGP SIGNATURE-----
> > >
> > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > > >> unsubscribe <<
> > >>
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > >> unsubscribe <<
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9+MLFWQvEMJfcXlQRAvBkAJ9BtO5MH4ipmZkYbsK/TYfR90ip7ACgnABV
> 9HZOINaxSWscM+HVj7n78Y0=
> =JgKb
> -----END PGP SIGNATURE-----
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic