Eike Ziller

Qt Creator 4.8.0 released

Published Thursday December 6th, 2018
36 Comments on Qt Creator 4.8.0 released
Posted in Biz Circuit & Dev Loop, QtCreator, Releases

We are happy to announce the release of Qt Creator 4.8.0!

Programming Language Support

We have added experimental support for the Language Server Protocol (LSP), which adds basic support for various programming languages to Qt Creator.

Language Server Protocol support in Qt Creator 4.8

The Language Server Protocol is a standardized bridge between an editor or an IDE and a programming language. This makes it easy for a programming language to be supported by editors and IDEs: If it provides a server application that speaks this protocol, every editor that implements a language protocol client gains support for code completion, code navigation and code diagnostics for the programming language. And of course the other way round: An editor that implements a language protocol client automatically gains basic support for a various range of programming languages. There are language server implementations for many programming languages already. You can find lists of implementations and their state for example on the official LSP website and on a community driven site.

To set up a language server in Qt Creator, you first need to enable the LanguageClient plugin in Help > About Plugins (Qt Creator > About Plugins on macOS). Then open the language client options, add a language server executable, and specify the MIME type or glob patterns to open with that language server, and any arguments that the server needs to be passed on the command line.

Qt Creator currently supports code completion, highlighting of the symbol under cursor, and jumping to the symbol definition, and integrates diagnostics from the language server. Code highlighting is done through the generic highlighter, since the Language Server Protocol does not provide it.

C++ Support

We updated the Clang code model to LLVM 7.0. We also implemented Follow Symbol for the auto keyword, and completion tooltips now show the available overloads for the selected function. You can export the information that the code model has about your project as a compilation database with the new Build > Generate Compilation Database.

There are several new experimental plugins as well:

Compilation Database Projects

After enabling the CompilationDatabaseProjectManager plugin, you can open compilation databases as projects in Qt Creator. A compilation database is basically a list of files and the compiler flags that are used to compile them. Some build systems and tools are able to generate such databases for use in other tools. This can be an alternative to using a Generic Project, since it feeds better information about compiler flags and include paths to the code model.

Clang Format Based Indentation

Does auto-indentation via LibFormat which is the backend used by Clang Format. Enable the plugin ClangFormat to try it.

Cppcheck Diagnostics

Integrates diagnostics generated by the tool Cppcheck into the editor. Enable the plugin Cppcheck to try it.


Qt Creator 4.8 supports simultaneously running multiple debuggers. The debugger tool bar in the Debug mode has an additional pop up menu where you can switch between running debugger instances and the “preset” view which allows to start new debuggers. Each running debugger instance also maintains its own set of views (Locals, Watches, Stack, etc) and their layout.

Get Qt Creator 4.8.0

The opensource version is available on the Qt download page, and you find commercially licensed packages on the Qt Account Portal. Qt Creator 4.8.0 is also available through an update in the online installer. 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 Biz Circuit & Dev Loop, QtCreator, Releases


Mateusz says:

Seems great, but I cant use it on Ubuntu 14.04 (trusty):
…/Qt/Tools/QtCreator/bin/qtcreator: relocation error: …/Qt/Tools/QtCreator/lib/Qt/lib/libQt5DBus.so.5: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference
Probably to old system 🙁

Sam says:

This is my problem too. Linux Mint based off Ubuntu 14.04. 🙁
There’s still a few months left of LTS support!

Sam says:

I did try 4.8 beta1 (I think it was), which did work on Ubuntu 14.04, so this is a little disappointing.

Eike Ziller Eike Ziller says:

We switched the prebuilt binary to the Qt 5.12.0 binaries, so we support whatever that supports. Of course you can still build Qt Creator yourself too (also against the prebuilt Qt 5.9 binaries).

LC says:

I filed this as a bug (QTCREATORBUG-21658) as the MaintenanceTool does not warn and will leave a dead system behind. That is, it will offer you no way of going back (you have to kick MaintenanceTool and do it by hand).
Furthermore, you shouldn’t silently drop system support in minor versions. While this would be understandable when moving from Qt 5.x to 6 and Qt Creator 4.7 to 5, it is NOT when going from 5.11 to 5.12 or 4.7 to 4.8.

Nocpes says:

You can download lib-dbus latest and build.
After that, write other bash script:
export LD_LIBRARY_PATH=path/to/your/built/dbus/lib
Start qtcreator.

prashanth says:

After installing I get an error on startup.
relocation error: /home/me/qtcreator-4.8.0/bin/qtcreator/home/me/qtcreator-4.8.0/lib/Qt/plugins/platforms/../../lib/libQt5DBus.so.5: relocation error: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference: /home/me/qtcreator-4.8.0/lib/Qt/plugins/platforms/../../lib/libQt5DBus.so.5
: symbol dbus_message_set_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference

I use centos7.

Eike Ziller Eike Ziller says:

Is your CentOS 7 up to date? I think I checked an RC build on my CentOS 7 VM.

Vladiomir says:

I haven’t found link to full git changelog, so here it is:
Maybe someone found it useful.

vemod says:

I can’t run it on OS X 10.11.6. OS X 10.10.0 or later is needed. Intentional?

vemod says:

10.12.0 or later, that is!

Eike Ziller Eike Ziller says:

Same comment as above 😉

We switched the prebuilt binary to the Qt 5.12.0 binaries, so we support whatever that supports. Of course you can still build Qt Creator yourself too (also against the prebuilt Qt 5.9 binaries).

Vladimir says:

Thanks, good job!

The feelings, now (with enabled Сlang) large files with the source code (30,000 lines) open much faster than in 4.7 .

I can’t understand one thing. I enabled cppcheck plugins, restarted QtCreator, but I can’t find how to use the analysis. Or need to install cppcheck separately?

Fabrice Mousset says:

Yes ccpcheck has to be installed sperately and path must be defined in Tools/Options/Analyszer/Cppcheck


Looks like the support for the cppcheck is very preliminary, the only thing it does is checks currently open file. I.e. you can’t run the analyzer on the whole project (or I missed somth?), the warnings are not shown in the bottom tab either (again, am I missing smth?).

aportale says:

Yes, in it current form, CppCheck runs its diagnostics on the currently edited file, on the state that is saved on disk and the issues are not shown in the issues view. Anyway, IMHO even with a current feature disparity compared to the clang-tidy and clazy integration, CppCheck adds lots of useful diagnostics, and is quite fast at that 🙂
On Windows I prefer installing it via “choco install cppcheck”.

Mateuszl says:

I don’t understand – clang format plugin does indentation only or all of formatting that standalone clang-format does?

Eike Ziller Eike Ziller says:

By default it only indents for now. If you want to see how it behaves when actually formatting the code, you can try that by setting the magic hidden environment variable QTC_FORMAT_INSTEAD_OF_INDENT=1 .

Mateusz says:

Works nice, thanks! Especially that it formats only selected fragment is great.

If this feature will be developed further (I hope so), here are some feature requests:
* format whole file (perhaps when nothing is selected?)
* Use .clang-format file from current file directory (or from file’s parent recursively), if not available fallback to file from home directory, if not available fallback to QtCreator configuration or default. Formatting rules are often project-specific, not global.

kryksyh says:

Isn’t it what Beautifier plugin does for a quite a long time?

Nikolai says:

I have a question about compilation_database. Does it work only with cmake or qmake support too?

Eike Ziller Eike Ziller says:

If you mean the _export_, that simply exports the information that the code model has independent from where it gets that information from (QMake, CMake, Qbs, Autotools, ….)

Nikolai says:

Yep! Thanks! I Checked it.

What about command line ? Can I get compilation_database from command line from *.pro file ?

Try says:

Debugger UI completely destroyed!
Every time I stop debugging, It resets to fixed(predefined?) state.

Fabien says:

Thanks for the new release!

Unfortunately, I can’t use it with my project because the code model parser can’t parse my code when _GNU_SOURCE is defined, so it’s full of errors, even though the code compiles fine. This is on my ubuntu 18.04 with gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

This file breaks the code model parser:

#ifndef _GNU_SOURCE
# define _GNU_SOURCE


(sorry for the bug report, but the bug tracker is down right now – I’ll add my test project as soon as it’s online)

veysel says:

libQt5DBus.so.5: relocation error: symbol dbus_message_get_allow_interactive_authorization….
same error on “CentOS Linux release 7.3.1611 (Core) ”
if only there have been another version suitable with these systems.

Nate Reid says:

I just installed Creator 4.8, but the Language Server option is not available in the Options. See screen shot:

I’m running this on Windows 10.

Nate Reid says:

I found the fix which is to enable the (still) experimental plugin in the Help->Plugins.
Despite getting this installed and restarting Qt Creator, and going through the steps to add Python support as per the animated Gif at the beginning of this post, it still doesn’t seem to create completions for certain libraries.
In addition, hitting ‘ctrl-space’ takes ages (5-10 seconds) for the completions to show up. Are completions cached, or pre-populated on file-scan?

Gabriel Acosta says:

The same thing is happening to me.

Eike Ziller Eike Ziller says:

This is completely up to the language server, e.g. pyls in the case of Python.

Matheus França says:

I am also using Windows 10 currently, I enabled the LS plugin testing pyls (py 3.7) and rls (rust) both worked perfectly.

chelsea says:

Definitely nice post and thank you, sir, for your great post.

jhon eric says:

Having a great post, which has much information about the keyword. The nice article always praising.

real_zyf says:

My Project is base on 5.11.1
Qt Creator now update to 4.8
I got
> no member named ‘PlaceholderText’ in ‘QPalette’
because Qt Creator add “PlaceholderText” to my *.ui file but 5.11.1 not have PlaceholderText
so I must upgrade my project?

Loïc says:

Sadly each new version work less than the previous one.
I exclusivity uses generic project and it works great on 4.6.

But now with 4.8 it stops parsing all includes on the first error in an header. It does not even tell you in which header it fails, so you have to open each header to find what it does not like. And even when you find it you cannot do anything because it refuses to parse a macro for some reason.
Previously even if some header could not be parsed completely it was still getting the existing type and continue to parse other includes. So only the class of the failed header could not be resolved, but all other types were resolved correctly.

Also its really annoying to not be allowed to set compiler flag globally. The compilation database is way too complicated for simple case were all the files are compiled with the same flags.

MrSparc says:

Finally came back the Locals and Expressions views in a non-tabs approach so we can see in Debug the vars in both views simultaneously and not go jumping like crazy between tabs.
Just for this only it worth the upgrade.
Thanks “cute” dev team 🙂

Leave a Reply

Your email address will not be published.

Get started today with Qt Download now