Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Multiple Tab support:Qt Creator



  • Is there a way for opening multiple source/header files in separate tabs in Qt-Creator.
    Would like to have this feature.

    Any pointers to the above problem will be highly appreciated.


  • Moderators

    @mapuna

    hi,
    in the upper right corner you can press the splitter icon
    0_1523425134245_81c9d8de-31ee-418b-8ef6-582754929953-image.png

    you can than split your main view into multiple views, each can show a different file or different position inside the same file or you can detach a view and make it its own window, to move it on a 2nd display.



  • @J-Hilk thanks for such a quick reply. I see I can make use of this feature.

    But I was looking something like clicking on files in Projects window would automatically add new tabs to my editor pane something on line as eclipse, and then I can select which tab to view currently.
    I feel this is something is not present in current Qt-creator.


  • Moderators

    @mapuna
    mmh, not quite what you're looking for, but you can do a a couple of different things.

    For example,
    all opend files are added to the combobox over you view:
    0_1523425788736_c911de9b-24f0-4638-b4f8-4848068fabd2-image.png

    A can use that to switch between open "tabs" or use the short cut "strg+tab" to get a popup view of all open files and cycle through them:
    0_1523425875671_713a24df-8445-4836-9e48-ceca2f8bf173-image.png

    You can also set one of the views to show open documents:
    0_1523425928617_3b30cc9a-0b7b-42ae-90a5-301087c4406c-image.png

    Thats all the ways I know of and use. :-)


  • Lifetime Qt Champion

    @mapuna all the options @J-Hilk named are possible. QtCreator doesn't have tabs and never will. it's a design decision and imho, it's the correct decision.

    after a while, you don't miss them.



  • Yup, I been looking for same thing. Visual Studio, Sublime, VsCode, Notepad++, Netbeans, Eclipse, Codeblocks, Dev, Delphi all these IDE's have tab layouts - this decision needs a review.


  • Lifetime Qt Champion

    @sura
    Hi
    Its open-source so you could add it your self if you miss them a lot.

    I dont miss tabs at all even that i use other IDEs that has them.

    The open Docs view and the file drop down list on top of current file
    and ctrl +K is so much better than tabs.



  • AFAIK, there were proposed a lot of patches to the QtC to enable the 'tabs' support, but all this suggestions were rejected.



  • @mrjj said in Multiple Tab support:Qt Creator:

    and ctrl +K is so much better than tabs.

    wtf does Ctrl+K do? :)


  • Lifetime Qt Champion

    @JonB
    super search. even takes regular expressions.
    i also use it to go to files as it can also search taht.
    so ctrl +k and type a few letters and you are there. Often much faster than navigating the project tree :)

    alt text



  • @mrjj
    Too much typing :) But I'll bear it in mind!

    Can you do this one in Creator:

    1. I'm in a file on, say, object.methd();. And I click on the method and press whichever key (can't remember) which takes me to the definition body of the method. Which is fine.

    2. Now I want a key which takes me back to wherever I came from when I pressed that key (i.e. the calling code).
      a. This may be in another file.
      b. Or, it may be elsewhere in the same file.

    Is there an easy key for 2.a. and/or 2.b.?


  • Lifetime Qt Champion

    @JonB
    hi
    Its ultra fast even with typing and im lazy :)

    1. alt + arrow (cursor ) key left
      cycles in history. ( right goes forward)
      and includes places in same file.


  • @mrjj Provided I can remember that, that will be really useful for me!


Log in to reply