Important: Please read the Qt Code of Conduct -

How to create a Tab layout like in Qt Creator?

  • Hi!

    I just played around a bit with the Qt Designer and wondered whether it would be possible to create a Tab "Widget" which looks very similiar to the Qt Creator itself, i.e. you have a big bar with icons on the left side from which you can select. Till now i only managed to do this with Buttons, however the style of the buttons is quite "fixed" and doesn't quite look as good. Any ideas on how to achieve this desired layout?


  • Moderators

    Check creators code... it is available "here":

  • Hey Xaser!

    Have you tried achieving this simply with a toolbar to which you set the position on the left anchor and forbid it to move?

    That would be my first guess. You can always get the Qt Creator source code from the download page and dig through the code.


  • Hey thanks for the Tipp to use the sourcecode - i didn't even know it was available. I looked through it and already located the icons in the ProjectExplorer Plugin. However i'm still busy scanning the code of the plugin for the referenzes to the icons or to any GUI code regarding this menu bar - and i just can't find anything.

    Can maybe somebody lead me to the right track?

  • Please stick to English in the general forums - it's our lingua franca here :-) We have a "German language subforum":/forums/viewforum/30/ if you want to discuss in German, though.

  • Whupsy ^^ Got confused jumping between the two language forums :)

    I have edited the post thanks ^^

  • Moderators

    Sorry, I am not sure which widget you were actually referring to, so providing more accurate information on where to find it is kind of difficult:-)

  • Well in Qt Creator you have that dark bar with icons on the left side where you can switch between the main modes, welcome, edit, design and so on. I wish to create something like that.


  • Moderators

    I think that is src/plugins/coreplugin/fancytabwidget.cpp.

    I never had to touch that part of the code, so I might be wrong though:-)

  • That looks like it, thanks!

  • I know this is very old thread. Please let me know, Can I use this widget in my commercial LGPL licence project?

Log in to reply