[Qt-creator] Core::EditorManagerPlaceHolder::current() method replacement in Qt Creator 3.0
Ziller Eike
Eike.Ziller at digia.com
Thu Feb 20 15:21:10 CET 2014
On Feb 20, 2014, at 2:37 PM, Xiaofeng Wu <djangowu at gmail.com> wrote:
> Hi,
Hi, please do not send the same email multiple times.
> I only want the tabs to show up in the main window, so what you said is not a problem to me.
>
> I understand that I can "take EditorManager::instance(), install yourself as an event filter" so that if the instance()'s parent changes, my code will know that.
> But, when it happens, what is the code look like if I want to add a QTabWidget on top of the editor panel?
you get the parent of EditorManager::instance(), if that is not 0, it is the EditorManagerPlaceHolder instance like before.
Br, Eike
> On Wed, Feb 19, 2014 at 10:22 AM, Ziller Eike <Eike.Ziller at digia.com> wrote:
> Hi,
>
> I suppose you could take EditorManager::instance(), install yourself as an event filter, and do whatever magic on ParentChange events.
>
> Note that both your old method, and anything based on the parent of EditorManager::instance(), does not work with additional editor windows (Window > Open in New Window).
>
> Br, Eike
>
> On Feb 19, 2014, at 3:25 PM, Xiaofeng Wu <djangowu at gmail.com> wrote:
>
> > I am developing a Qt Creator plugin. This plugin shows currently opened files as a QTabWidget on top of the editor pane. In Qt Creator 2.8, the code works like the following,
> > Core::EditorManagerPlaceHolder* holder = Core::EditorManagerPlaceHolder::current();
> > holder->layout()->addWidget(myTabWidget);
> >
> > Here is the screen shot for the plugin running in Qt Creator 2.8
> >
> > <1.png>
> >
> > However, in Qt Creator 3.0, the method Core::EditorManagerPlaceHolder::current() no longer exists. In this situation how am I able to put the QTabWidget on the top the editor window
> > _______________________________________________
> > Qt-creator mailing list
> > Qt-creator at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qt-creator
>
> --
> Eike Ziller, Senior Software Engineer - Digia, Qt
>
> Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
> Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list