[Qt-creator] Qt-creator 2.0.0 evalution subjects

Daniel Teske daniel.teske at nokia.com
Wed Apr 7 14:33:28 CEST 2010


> 2) Working with tabs is very handy. It would be pleasant if you can open
> multiple documents and switch between them by clicking the tab instead
> of the up/down arrow.

That suggestion comes up from time to time, so let me catch the opportunity to 
explain why we think managing your editors is a waste of time. And do a round 
up of all the ways you can navigate source code in creator.

a) Tabs don't scale. That is they work fine if you have 5-6 editors open, they 
get cumbersome with 10 and if you need more horizontal space then the tab bar 
then the interface doesn't work at all.

b) Tabs don't adapt to your working set.

c) The common solution is to give the user the ability to reorder tabs. Now 
the user has to manage tabs instead of writing code. 

d) Tabs force you to limit the amount of open editors, because otherwise you 
get confused.

Now, considers this use case description:
"The users wants to switch editors."

That's wrong. The user never wants to switch editors, rather switching editors 
is a mean to some other end. Instead we need to figure out what common tasks 
involve switching editors. Now I won't do that here, nor have we actually done 
that, but that's the thinking behind figuring out better ways to help the user 
navigate. And obviously we are drawing from a lot of experience ourselves 
developing code.

One of the common things in many use cases is switching editors in a small 
working set. That is you are working on file a b and sometimes need to look at 
c, but much more editors. We have a shortcut for that: Ctrl+Tab
The list in that window is sorted according to last used.

Or another common thing is that you are working on multiple classes/functions 
that relate to each other, but are defined/declared in different files. We have 
two shortcut for that: F2 to follow the symbol.
And Ctrl+Shift+U to find usages. (Arguably the second one isn't that helpful if 
you already had the editor open, but the first one is great even if you know 
that the editor would be once of the first one in the Ctrl+Tab list)

And obviously we have F4 for switching between header and source. 

And then there is: Alt+Left for going backwards in the navigation history.

Or use the locator (Ctrl+K) to simply tell creator where you want to go. 
Obviously it can be used to open files, but opening files is a mean to some 
other end.

Let me give you an example for that: 
The use case being: Doing a simple fix in AMethod in SomeClass which comes from 
someclass.cpp/someclass.h

With a tabbed user interface, you search for someclass.cpp in your tab bar, 
search for ::AMethod, find out that the method is not in that file, search for 
someclass.h in the tab bar, indeed the function is inline, do your one line fix 
and forgot where you came from.

With Creator, you can press Ctrl+K m AMet (depending on your project, you 
probably need to type just 3-4 chars of the name.) Do your one line fix and 
then use Alt+Back to go back where you were.

There are a few more like: Ctrl+K c for classes, Ctrl+K : for all symbols. And 
thanks to a community contribution: Ctrl+K . for symbols from the current file.

daniel



More information about the Qt-creator-old mailing list