Qt-interest Archive, March 2002
Text editing
Message 1 in thread
Hi,
Any suggestions on the best way to go about integrating QT's text editing
facilities (ie. QTextEdit) with its drawing facilities (ie. QCanvas or
something)? Basically I want to use low-level vector graphics on top of a
QTextEdit widget. Say to draw a box around an important grouping of text.
Cheers,
Nicholas.
Message 2 in thread
[version 2 for the silly mailbot that thinks all short answers must be
erroneous]
> Hi,
> Any suggestions on the best way to go about integrating QT's text editing
> facilities (ie. QTextEdit) with its drawing facilities (ie. QCanvas or
> something)? Basically I want to use low-level vector graphics on top of a
> QTextEdit widget. Say to draw a box around an important grouping of text.
Widgets are paint devices. See QPainter.
--
[ signature omitted ]
Message 3 in thread
> Widgets are paint devices. See QPainter.
Thanks, I will investigate... Presumably QPainter is also involved in the
drawing of the actual text in the QTextEdit widget as well. If I was looking
at syntax highlighting as well, would this be better located in QPainter
since I'm already there, or should it be implemented as a QStyleSheet?
(Assuming a QStyleSheet is what I think it is).
Nicholas.
Message 4 in thread
> > Widgets are paint devices. See QPainter.
>
> Thanks, I will investigate... Presumably QPainter is also involved in the
> drawing of the actual text in the QTextEdit widget as well. If I was looking
> at syntax highlighting as well, would this be better located in QPainter
> since I'm already there, or should it be implemented as a QStyleSheet?
> (Assuming a QStyleSheet is what I think it is).
I don't think it's in QPainter. QStyleSheet might be a good guess. I haven't
looked. You might have a look at the example code that comes with the package
and see how the Trolls handle it.
--
[ signature omitted ]
Message 5 in thread
Nicholas Hildreth <n.hildreth@irl.cri.nz> wrote:
>Hi,
> Any suggestions on the best way to go about integrating QT's text editing
>facilities (ie. QTextEdit) with its drawing facilities (ie. QCanvas or
>something)? Basically I want to use low-level vector graphics on top of a
>QTextEdit widget. Say to draw a box around an important grouping of text.
Might a <table border="1"></table> do the job? If not, it might still be
useful to take a look at the code associated with "table" in the default
style sheet.
--
[ signature omitted ]