[Qt-interest] Search text inside QPicture
Zeljko
zeljko at holobit.net
Wed Jun 17 15:51:16 CEST 2009
Hi,
I need ability to search for text inside eg. QPrintPreviewWidget.
In win32 it's possible to search for text inside some print preview (via WMF
or EMF - metafiles).
QPicture is "meta-file" already, so I've maded simple routine
QPoint QPicture::findText(QPoint fromPoint, QString searchText, int frompos,
Qt::CaseSensitivity cs = Qt::CaseSensitive);
which does the job.
It's similar to QPicture::play(), but of course with different params,
I've copied private exec() call into new one execfindtext () with my new
params, and removed all painter calls inside execfindtext().
So now I can "search for particular text" inside QPicture.
This solution is definitelly "non-elegant" one (patching QPicture), but
maybe there's something else around ?
tnx.
z
More information about the Qt-interest-old
mailing list