Monday, May 10, 2010

Qt Creator 2.0 Beta First Impressions

Last week Nokia released a beta of Qt Creator 2.0 (and Qt 4.7 FWIW) and I have finally managed to spend some time playing with it today. Here's a quick list of likes and dislikes in no particular order.

Likes
  • The new Options dialog is much easier to use IMHO. It doesn't add much to the product but there's nothing wrong with a bit of polish and attention to detail.
  • Support for Mercurial (Hg). I have been using this today without any problems.
  • Revamped Projects view. I'm not a massive fan of anything that leads to a dependency on a .pro.user file but the new Projects page is much easier to use than previous releases.
  • The new Build/Target button is pretty smart and really useful when you have multiple projects loaded. Ctrl+T pops it up for those of us who are keyboard-centric.
  • You can now right-click on a project file and open it using the 'System Editor' (i.e. the application registered for the selected file extension) which I will be using a lot.
  • You can finally set the default projects directory.
Dislikes
  • On Windows, Ctrl+W no longer closes the current file - this has now been changed to the 'standard' Ctrl+F4 keystroke instead. I found this annoying and can hopefully restore Ctrl+W using the keyboard mappings editor.
  • The Output view has been removed. I am in two minds as to whether this was a good idea.
  • You cannot make a project active by right-clicking on it - you have to use the new Build/Run Target Selector.
  • I cannot get the Mercurial commit keystroke to work (Alt+H, Alt+C). Alt+H opens the Help menu. I must be missing something here.
  • When you are editing a .ui file, the new Design view is enabled. If you switch back to the Edit view, the XML .ui file is displayed in read-only mode. I'm not sure if this is desirable.
  • Shadow builds are enabled by default which confused me for a little while ("Where the hell's my bloody executable?"). I'm actually on the fence about shadow builds - I'm only doing desktop development so aren't sure if they are of much use to me. Plus I can't find a really good overview of the advantages of using them.
Overall I do prefer it to 1.3 and as I've come to expect from Nokia, it's rock solid.

I'll post a more detailed review when the final version ships (which I'm betting won't be long.)

9 comments:

  1. "You cannot make a project active by right-clicking on it"

    Don't get me started on this. I raised it on the mailing list and here:
    http://bugreports.qt.nokia.com/browse/QTCREATORBUG-317

    I got the usual stone-walling/you are stupid response. I can't understand why Nokia/Qt insist on doing everything the hard way. I hate the new project selector dialog. It doesn't work with long project names, it gets really confused with subdirs when you remove projects and it just looks odd.

    On a related note, they have finally added the ability to clean and rebuild subdir projects:

    http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1295

    I guess it's worth the tradeoff. It's not in the snapshots yet but it's one step towards making Creator a real IDE.

    "If you switch back to the Edit view, the XML .ui file is displayed in read-only mode"

    Another bug-bear. I was stone-walled again. I have no idea why they done this is. Also have you tried the new QML designer? Who 'designed' that turd?! It makes the old Designer interface look modern and clean. My big fear now is that some genius is going to 'redesign' the old designer to match.

    "Shadow builds are enabled by default"

    I initially complained bitterly about this because it broke all my project and forces us to use the f**king pro.user files. I'll forward you the mailing list convo. That said, having changed all my settings and workflow, it does seem to work better even if I'm not convinced that qmake couldn't do the same thing. It still bugs me that it's on by default and those pro.user files are here to stay.

    Also you didn't mention the debugger. It seems to be massively improved in 2.0. It works consistently on the Mac (my main platform), is both faster and more feature-rich than Apple's own XCode version (not that it's saying much but Apple don't want you to use C++ and it shows).

    ReplyDelete
  2. @Danny; if your interactions with the QtDesigner people is as friendly in tone as your post here, I'm not at all surprised you were "stonewalled" :)

    I wanted to write here to point out that there is a huge advantage to using shadow builds. They don't pollute your source tree. So you never will have issues like you accidentally deleting a source file when cleaning or forgetting to add it to the source management system because you missed it in the crowd.
    Naturally the ability to recover from a bogus build by just removing your whole build dir is similarly useful.
    As to where do your executables go; use the DESTDIR var in your .pro file to put it anywhere you want.

    Cheers!

    ReplyDelete
  3. @Anonymous: Thanks for the DESTDIR tip - I will give shadow builds a try and see how they work for my Qt projects.

    @Danny: I haven't done much debugging using the 2.0 beta yet but I have read about the improvements - and as a gdb user, I welcome any changes here. :)

    ReplyDelete
  4. Anonymous;

    I'm just frustrated. Qt/Nokia don't seem to have a plan for Creator and they refuse to implement the kind of basic features you'd expect to find in a modern IDE, such as logical folder groups or even the ability to rename files within the IDE (yes I know I keep bringing that one up but when you refactor as much code as I do it gets old fast and it's also one of the most voted-for and watched tickets in the whole database so I'm not alone here : http://bugreports.qt.nokia.com/browse/QTCREATORBUG-26)

    Nokia/Qt also seem to shift from one position to the next when it comes to project management. First Creator was an IDE. Then it was a text editor. Now it's a supplement (NOT a replacement) to VisualStudio/Eclipse. The official advice used to be to use sessions for management projects, now with the introduction of shadow building, they're recommending the use of Subdirs (even though there is ZERO support for setting up subdirs within the IDE).

    Another example, this time with the 'dependency editor' that doesn't actually appear to do squat:
    http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1275

    As for shadow builds, they appear to add nothing that couldn't already be achieved through qmake (OBJECTS_DIR, DESTDIR, MOC_DIR etc). See this one: http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1274

    My complaint there was that Creator does nothing to help the user set library deps the way any other IDEs do - shadow building does not address this.

    I believe that Creator could be a viable alternative to Eclipse or MSVC. But you try evangelizing it to your colleagues while explaining that it can't even do the most basic things :(

    ReplyDelete
  5. Good news Danny, http://bugreports.qt.nokia.com/browse/QTCREATORBUG-26 seems to be done. :)

    ReplyDelete
  6. @Rob:
    Thanks a lot for the comments!
    It's good to hear some feedback about the project + target setup (and even nicer to hear positive feedback ;) )

    Some personal comments on the various topics:

    reg. Ctrl+W on Windows: This has been fixed (now, both Ctrl+F4 and Ctrl+W should work on windows).

    reg. Output Mode: did you see that the Output Panes can be maximized now?

    reg. Design Mode: This is basically a consistency-inconsistency-what-does-actually-make-sense question. We are not sure about the answer yet. The Design mode partly exists because of the upcoming Qt Quick Designer, where simultaneously editing of the source qml file and visual editing makes sense.

    reg. Shadow builds: A big advantage of shadow builds over adding the various flags to the pro file is that you can change your shadow build directory without editing your pro files. Other advantages of shadow builds become most apparent when building for multiple targets (already when building for release and debug), where you need to make sure that the build results of one build don't interfere with the results of another.

    reg. IDEs: Who defines what an IDE is? For me, the priorities are clear: Project management in an IDE is in the first place the enabler for great code editing features and operations like (deploying+) running and debugging your applications. If you look out there, you'll find a lot of failed IDE projects. Most of them have the project management features, like organizing in virtual folders and such. So, why did they fail? Many don't understand your code, don't have working code completion, or badly lacking debugging functionalities. Their priorities were wrong. (Well, they might also have lacked the resources. But especially when you are short on resources (aren't we always?), you'll have to set priorities.)

    @danny: we were recommending subdirs pro files from the beginning, long before we made shadow building default. We are also recommending the use of sessions. They are not mutually exclusive at all and both serve their purpose. But also see http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1218 for some thoughts on sessions.
    I agree that "Dependencies" is not the best term for the tab in projects mode.

    Happy Hacking :)

    ReplyDelete
  7. I have to say that I am totally sold on shadow builds now and find them very useful.

    ReplyDelete
  8. I am trying to find out documentation that describes how to use QtCreator together with SVN and can't find one. Does one exists?

    ReplyDelete
  9. I've used the SVN integration before - you'll need an SVN client (svn.exe) installed on your PC (assuming Windows) - just TortoiseSVN alone won't do.

    ReplyDelete