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=20
the method TextEdit::textStyle seems to do what you want to do. However i=
t=20
uses QTextEdit::setParagType to do so and in qtextedit.h, setParagType is=
=20
marked as "do not use, will go away".=20
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 (=20
http://www.trolltech.com ), especially in the mailing lists archives or a=
sk=20
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 thoug=
h,
> how to start typing text for a
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, wha=
t 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 yo=
u
> > 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 sub=
set
> > > of HTML entities. Those are things like bold and italic, enumeratio=
ns
> > > and the different heading levels (...). As far as I underst=
and
> > > 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 editi=
ng a
> > > section for example. Bold, italic and so on are easy but how w=
ould
> > > I use other tags? It would be okay to only be able to set for =
a
> > > selection.
> > >
> > > Thanks for any help or links.
> > >
> > > Richard
> > >
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.0.7 (GNU/Linux)
> > >
> > > iD8DBQE9+JJ4WQvEMJfcXlQRAruHAJ0e4ut6NO8Y0g542Ib7VXRnXqowDgCfSSXS
> > > U0tRQD9VsrYlu8ccZyBxN68=3D
> > > =3DA8py
> > > -----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=3D
> =3DJgKb
> -----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 <<