[Qt-creator] Create SplitView in EditorManager programmatically

Eike Ziller Eike.Ziller at qt.io
Fri Mar 6 15:29:44 CET 2020



> On 6. Mar 2020, at 15:15, Vidhya Arun <svidhyapria at gmail.com> wrote:
> 
> Hello All 
> 
> I am creating a plugin for ascii doc preview for which I need to create a splitView in the EditorManager.
> My idea is to create a plainTextEdit in one side of Editor and a previewer in the other split.
> 
> Are there any methods exposed directly from TextEditor or EditorManager plugin to create this split view (The split Side by side functionality that we are able to do it manually in QtCreator editor is what am trying to call programatically )

The only options that you have programmatically are "EditorManager::openEditor(filename, Id(), EditorManager::OpenInOtherSplit)” (opens document in “next” split view, creates split view if there is none yet),
and possibly "EditorManager::openEditor(...., EditorManager::SwitchSplitIfAlreadyVisible)", which does not open the document in the current view, if it is already visible in a different view.
Otherwise splits are currently not exposed to the outside.

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list