Am 5/17/2013 11:45 PM, schrieb Thomas Meyer:
Hi,
how can I send a simple string (QString) from a plugin to the 'General
Messages' panel (or pane)
and how to the TextEditor (an opened text file)?

Hi,

you can use EditorManager::currentEditor() to get the editor.
You receive an IEditor object, which you have to cast to ITextEditor.
ITextEditor define the function insert(const QString& string)....

sample code:

if(IEditor*editor=EditorManager::currentEditor()){
if(TextEditor::ITextEditor*textEditor=qobject_cast<TextEditor::ITextEditor*>(editor))
textEditor->insert(QString("Helloworld"));
}

Don't forget to add the TextEditor Plugin as a dependencie to your plugin :)

BR,
David

Where can I find some documentation about the 'communication' (sending
or receiving strings etc.)
between plugins and the different panes (panels?) and the TextEditor?

Example:
I have build a simple plugin, which is a dialog with a button 'send
text' and should send
'Hello world' to an opened text file. For 'debugging' I want to send
'send text pressed'
to the 'General Messages' pane.

Thanks,
      Thomas


_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to