Eike Ziller

Qt Creator 4.0 Beta released

Published Wednesday March 23rd, 2016
51 Comments on Qt Creator 4.0 Beta released
Posted in Dev Loop, Qt, QtCreator, Releases

We are happy to announce the release of Qt Creator 4.0 Beta.

As announced earlier this year, starting with this release Qt Creator will be available under commercial license terms and GPLv3 (with exceptions). At the same time we are making the following features available under open source, which were previously only available under commercial license terms. So, if you didn’t know them, make sure to check them out!

Clang Static Analyzer Integration

Find problems in C, C++ and Objective-C programs. (Documentation)

Autotest Integration (Experimental)

Easily run autotests from your project and get the results presented in a friendly way. (Documentation)

Extended QML Profiler

Profile pixmap cache usage, scene graph performance, JavaScript memory usage and input events of QML applications. (Documentation)

 

We also started implementing a flat theme for which Diana presented the concepts already a year ago. This is still work in progress, but you can see for yourself by switching to the new theme “Default Flat” in Tools > Options > Environment > Interface.

Users of CMake will find that we improved the workflow for CMake-based projects. CMake is now triggered automatically when necessary, which makes for a much nicer user experience. Kit settings like the Qt version or tool chain used are automatically configured in CMake build directories, removing one more obstacle for users. Projects mode now features a UI to change the CMake configuration for a build directory. Qt Creator will no longer create CMake build directories before the project is built. This makes for a much tidier work environment, especially when users only want to study source code using the CMake build system.

If you wonder where Analyze mode has gone: It is now merged into Debug mode. There is not much of a difference really. Merging them removes complexity code-wise and user-interface-wise, and it actually opens up some flexibility for us for the future.

There were many more improvements, and more features added, please check our change log for details.

You find the opensource version on the Qt download page, and commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on chat.freenode.net, and on the Qt Creator mailing list.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Dev Loop, Qt, QtCreator, Releases

51 comments

Malek Khlif says:

Goood work.

I love flat design

BogDan says:

Congrats !
Autotest Integration and the flat theme are my favorites !

Johannes Lochmann says:

Thank you very much – qtcreator is already very good and getting better and better with each release!

Ronan says:

Very nice to see two of the main highlights have nothing specific to Qt:

– Clang Static Analyzer integration

– Automatic CMake triggering

Props to the team to improve Qt Creator as a friendly general C++ IDE, not just a friendly Qt IDE 🙂

Martin Kutny says:

Looking good. I love the integrated test runner too.

Has there been any progress on the diagraming (CASE) features? It would be great to have a way to reference diagrams from Doxygen or QDoc comments and create images from them in the final generated doc.

Jochen says:

I have written a command line tool which allows to export diagrams from a qmodel as pdf, svg, png, … I will release this tool soon. One can integrate this tool into documentation generation rules (first export diagrams then generate doxygen) and reference the diagrams by filename.

Nick says:

Does someone know if the code model (either the built-in one or the clang one) now supports auto-completion when dereferencing smart pointers? (std::shared_ptr, std::unique_ptr)

Nick says:

I just tried it myself, and the answer is yes, it works 🙂

Patrick says:

I have really missed this functionality!

Pavel says:

Qt Creator 4.0 beta1 crashes on OSX 10.10.5 when launching:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff90e8a286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff878ef9b3 abort + 129
2 org.qt-project.QtCore 0x000000010ecb81e9 0x10eca2000 + 90601
3 org.qt-project.QtCore 0x000000010ecb9bb7 QMessageLogger::fatal(char const*, …) const + 231
4 org.qt-project.QtGui 0x000000010e595b49 QGuiApplicationPrivate::createPlatformIntegration() + 6521
5 org.qt-project.QtGui 0x000000010e595b6b QGuiApplicationPrivate::createEventDispatcher() + 27

Eike Ziller Eike Ziller says:

Please create a bug report and also run Qt Creator from Terminal (“/Qt Creator.app/Contents/MacOS/Qt Creator”) and paste the output you see there at the time of crash. Thanks.

Aamer Shaikh says:

Qt Creator is getting better indeed, but am afraid if GPL versioning will discourage its use or not !

@Aamer: Why do you think GPL would discourage someone in using Qt Creator? GPL is not contagious to the applications written with Qt Creator.

Cristian says:

@Aamer The GCC compiler collection is also GPL licensed, did that stop its adoption?

Danny says:

Actually it did. My memory is hazy but I’m fairly certain that Apple developed Clang directly as a response to the stricter licensing introduced after GCC 4.2.

Filippo says:

Your work is not a derivative work of QtCreator nor of the compiler you used

Ken says:

Post says GLPv3, I think you mean GPLV3.

Arthur Turrini says:

For those interested in speeding up clang model parser, set QTC_CLANG_DELAYED_REPARSE_TIMEOUT environment variable to 50 (value in miliseconds), and your code will be parsed faster. I think that the default timeout is 1500 miliseconds. Use with care if your classes are too big.

Dan says:

Btw, I know this isn’t the best place for feature requests but are you going to improve session management? One feature I’d very like is automatic creation/saving of sessions per opened project (because sometimes I have to work in multiple Qt Creator windows and if I close them, the last one will overwrite default sessions which may be annoying).

Dan says:

Also, I recently used std::valarray and was disappointed by lack of “pretty printing” support in QtC debugging : it only showed size and first element of the array.

andre says:

Put something like
def qdump__std__valarray(d, value):
    d.putItemCount(value["_M_size"])
    d.putPlotData(value["_M_data"], value["_M_size"], d.templateArgument(value.type, 0))

into your share/qtcreator/debugger/stdtypes.py or put it into a separate file and point your Tools->Options->Debugger->GDB, Extra Debugging Helpers setting there.

If you want in addition the graphing display option (“Plot in separate window”) to show up under “Change Display Format” in the context menu, you would also have to add

def qform__std__valarray():
    return arrayForms()

Please note that in general, comments in blog posts are not a good place for bugreports and feature requests. It’s less effort to handle them at bugreports.qt-project.org.

Julius Bullinger says:

I’m getting a lot of “use of undeclared identifier ‘char16_t'” errors in MSVC’s header files from the static analyzer, making clang give up because of too many errors.

I don’t think that this is how it’s supposed to be, but is it a known issue already? Should I file a bug report?

Nikolai says:

Yes, please report this. Provide MSVC version and preferably a minimal example to reproduce.

Will Stokes says:

Looking good. I like the new flat them. Question: is it possible to make use of multiple cores when running the clang static analyzer? For compiling my project I edit the project settings by adding “-j8” to the make arguments. I wish I the analyzer could similarly be sped up.

Ernst says:

very expected feature, clang analyzer.
but is disabled in main menu in my installation (
how to enable this?
as I remember there was Analyze tab in mode selector, but this build doesn’t contain this…

andre says:

The blog post mentions the Analyze mode.

Ernst says:

How to enable analyze mode?
Last build of qtc doesn’t contain this mode on selector panel…

andre says:

Debug and Analyze modes have been merged, the result is called Debug mode. All the analyzing tools formerly available in the tool selector combobox in Analyze mode are now in the same location in Debug mode. All Analyzer related menu entries are in the same location as before. There has been no functionality removed.

Ernst says:

THank you for you patient.
Checked your recommendations. yes, I see clang static analyzer mode in combo in Debug mode selector, as there are also existing vagrind checks .
however when I’m switching to clang in a combo nothing happens and Clang Static Analyzer in Analyze main menu is also disabled. looks like this feature disabled in my configuration and I don’t know how to eneable. I’ve only checked that clang binaries are existing in the folder with qtcreator exe

Ernst says:

I believe that found the dependency between this problem and configuration. looks like a bug. raised the request here: https://bugreports.qt.io/browse/QTCREATORBUG-15980

d3fault says:

I’m confused by the ending of Exception 1 to the GPLv3. The part that reads: “you may create a larger work which contains the output of this application and distribute that work under terms of your choice, so long as […] the work does not in itself generate output that contains the output from this application in its original or modified form”.

Does that mean this example is not allowed?

in file /path/to/main.cpp :

int main()
{
QFile file(“/path/to/main.cpp”); file.open();
QByteArray outputFromQtCreatorInOriginalForm = file.readAll();
QFile file2(“/whatever.cpp”); file.open();
file2.write(outputFromQtCreatorInOriginalForm);
}

So since I wrote /path/to/main.cpp in Qt Creator, it’s “output from this application”, and since it generates itself, it “generates output from this application in it’s original […] form”.

Am I incorrect in my interpretation? Does that file need to fulfill the requirements of the GPLv3? I hope I’m wrong.

Tom Pollok says:

Is it possible to send some UI feedback somewhere to someone who takes care of it for the final release?

@Tom: Yes, for example via mailing list.

Michal says:

Any news about option to create new classes for CMake projects using GUI, just like for classic project files?
This is the only missing thing (maybe except poor translations support) that makes me keep old .pro file around.

Tobias Hunger says:

What does not work with CMake is to add the files to the build system. There is just no reliable way to do that without a lot of help from CMake or maintaining a parser for the CMake language (which unfortunately is a *lot* of work as that language keeps evolving all the time). Since adding files to CMake projects is not possible, you can not trigger the wizard via the context menu in the Projects view in the sidebar.

You should be able to use the class wizard for CMake based projects via File>New File or Project. You should also be able to assign a keyboard shortcut to trigger the wizard directly via Tools>Options>General>Keyboard. You will then need to register the new file with the build system manually though by editing the CMakeLists.txt file yourself.

Michal says:

Yeah… It’s a good point.
What about enabling that action anyway, but showing message box with warning (which could be disabled using check box) saying that output files have to be added manually?

Windows User says:

Why Qt Creator is still using undocable panels. Imagine … how to work in qt creator for multi-monitor configuration? Nobody suffering this?
Is there plan to update panels widgets so that they can be detached from main window?

Will Stokes says:

I use QtCreator on a multi-monitor system every day. For me the “Window -> Open in New Window” command does the job. I can have two maximized windows, or split either or both.

Nathan says:

Looks like there have been some changes to qbs as well. My project no longer links with the qbs this beta carries. Are there any docs on how to update my qbs files to be compatible with the new version?

I see that the syntax of getEnv has changed, but fixing that didn’t help my linking issue.

Christian says:

Your question is impossible to answer with the information you have given here. Please file a proper bug report at bugreports.qt.io, detailing what is going wring exactly.

Danny says:

I’m really happy to see static analyser come to the free version of Creator. This is long over due, in fact I think it was a mistake to lock it to the commercial license as that would only lead to developers creating poorly performing apps with Qt.

I’m not sure about the new theme though as it has been applied inconsistently and un themed elements (e.g. the Projects screen, the project/target icon, the designer etc) really stick out.

Also I’m sure if it’s intentional but the help viewer now looks AWFUL. I assume this is a bug?

Jared says:

Love continued development on this program. Thank you!

Just want to mention that new clang code model doesn’t parse my huge project well, while the qt code model figures things out well. Any other configuration instructions to get this to work? I’ve had to disable it…

Jozef Legény says:

I was wondering how I could add custom CMake flags to the CMake process. For one of the projects I need to specify -Wno-dev for the CMake step otherwise my console gets swamped by warnings. Before I’ve added this in the configure cmake dialog but now I can not seem to find the right place.

Thunder says:

Looks like you can do that in the Projects page under Build Steps, click Details and then add the desired options on the Tool arguments: line.

Yong Z says:

The Flat theme looks good indeed.

The auto-completion will invalid when typing parameter in a calling function.
This problem only would occurred when the function was typed first time,if you move the cursor out of the function position and then go back and retyping, the auto-completion will work again

Am I the only victim?

foo says:

How can one create CMake cache entries?

I tried passing -Dfoo=bar in the tool arguments for CMake, but it doesn’t work, I had to edit the cache manually…

The Cmake setting editor doesn’t allow adding things either, just editing.

Tobias Hunger says:

That is currently not possible at a project level, as I did not see a use-case for that: CMake should report all the settings it will evaluate to the Cache, so anything not there should not get evaluated anyway.

You can add new settings at the Kit level though (which will effect all CMake builds using that kit).

foo says:

Thanks Tobias. I see that there are some pre-populated cmake config variables in the kit which are always passed to cmake, even if I remove them manually from the config.

Unfortunately this is breaking cross-compilation for me. In particular, passing CMAKE_CXX_COMPILER results in errors when running cmake for one of my projects. I don’t have any control over the toolchain file (CMAKE_TOOLCHAIN_FILE), so I can’t fix it.

Tested with QtC 4.0.82 built from the 4 branch, cmake 2 and 3.

Commenting closed.

Get started today with Qt Download now