On Monday 20 September 2010 10:51:46 duan wenhui wrote:
> hi all,
> 
> how can I get current active editor in my own qt-creator plugin? of
> couse, a qt-creator had opened a txt/cpp file.

Easy, using the EditorManager:
    Core::EditorManager *editorManager = Core::EditorManager::instance();
    Core::IEditor *editor = editorManager->currentEditor();

Cheers,
Nicolas

-- 
Nicolas Arnaud-Cormos | [email protected] | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions

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

Reply via email to