TextBox in Output pane of Qt creator
I have a plugin which prints the output data read from a perl script in the General messages output pane. I want to make each statement from the output data clickable to parse the clicked output and open the file if valid.
To achieve this, I am trying to redirect each line to a textview/QLabel in Qt , to handle click events of it. Is it possible to create a label in output pane to display the texts in it from the plugin ?
I am a not a Qt expert. I don't know whether it's possible to do this in Qt Creator's Output window. But what sort of order of number of lines are you expecting? Because 1,000 lines => 1,000 separate
QLabelwidgets sounds non-scalable to me...
@JonB Yes, true. Definitely this doesnt look to be a good option to me either :| , but couldn't identify any other feasible solution yet.
You mean something like what Todo plugin does ?
@mrjj Exactly. Thanks a lot for this.
But this looks to identify the comments section from current document. The difference is I want to filter the warning/error output from General messages pane .
well i was thinking you altered the the todo sample and simple output
to that pane instead (from perl plugin) ?
What happened to your other thread? https://forum.qt.io/topic/86282/get-click-events-from-output-pane-of-qt-creator/5
As said there, the General Messages pane is currently missing that function, but it is there in Compile output e.g.
@aha_1980 I am open to redirect my output to Compile output window as well if this supports the link functionality.. But I see Core::MessageManager::write only redirects to General messages output pane. Do we have any similar interface to write to Compile output window ?
@mrjj No, I have not altered any. Its a plugin that reads the data from perl and dumps to output pane using MessageManager::write
ok. but if you already have a Creator plugin why not make your own pane ( like todo)
and just output there ?
@mrjj That would be great. But is it that simple ? Do we have any direct interfaces available for this ? Currently am referring ToDo plugin to understand how this is done.
Hi, to be frank, i would just reuse the toDo pane as
its all the same and only difference is what widgets are used.
As i remember it, it was not terrible complex when you had sample to reuse. :)