[Qt-creator] Plugin: open bugtracker links from comments

Liebe Markus (RtP2/TEF72) Markus.Liebe at de.bosch.com
Thu Feb 4 15:26:25 CET 2010


Hi Bjørn,

> BaseTextEditor supports extra selections which you can use to
> highlight
> certain parts of the text. This is used for the highlighting
> of unused
> variables, the links and marking of warnings/errors.

Thanks for this hint. I was able to highlight our Bugtracker comments using the QTextEdit::ExtraSelections!

Now I need to somehow get a trigger that somebody clicked with the mouse on the Link.
Normally I would do this by writing my own ::mousePressEvent(QMouseEvent *e) function. But in this case I cannot do that because I am not implementing an own BaseTextEditor but instead another plugin.

The only thing that I can use to work with in my plugin is a Pointer to an BaseTextEditor.
Do you have any idea how I can get the mousePressEvent from there? Sadly there are no signals containing the desired information in BaseTextEditor or its base classes.

Thanks,
Markus




More information about the Qt-creator-old mailing list