Home Qt Creator Editor News

Qt Creator Editor News

 
While Qt Creator 2.3.0 was only released recently, we’ve already been busy working on new features and bug fixes in the master branch for some time now. There have been a few interesting developments in the C++ and QML/JS editors that I’d like to share with you.
C++
We’re currently prototyping what would happen if we replaced our own C++ code model with clang’s. There’s just a couple of things left that need to be done before we’ll make the experimental branch public. There’ll be more about this in a different post.
The code style settings pages introduced in 2.3 have been overhauled. You can now set up several code style presets and easily switch between them. They can also be exported and imported to share them with your team.
 
 
 
There’s a new feature that helps you keep function declarations and definitions synchronized. Whenever you edit a function signature Creator will check if it can find the matching declaration or definition. If it found it and thinks it can apply your changes there, a little light bulb will appear at the end of the function. Open the list of quick fixes (Alt-Enter) and select ‘Apply changes’ to perform the same changes in the matching code.
If you’ve tried the ‘insert definition from declaration’ quick fix before but given up because it didn’t do everything you wanted, try it again! It’s been fixed to put the definition in a more natural spot (after the preceding declaration’s definition instead of at the end of the file) and has also become much smarter about minimizing qualified names (instead of always expanding them fully).
QML
There’ve been several improvements that make functionality you know from C++ work in QML. Find Usages now works on QML component names – and globally renaming just about every kind of symbol is now supported as well.
To aid reading QML and JavaScript code we’ve introduced semantic highlighting to the QML/JS editor. That means code with a special semantic meaning, such as external ids, JS variables, strings with state names and several others can be formatted differently.
The default color scheme tries to be helpful without being too distracting and doesn’t use different formatting for all of them. You can set it up as you see fit in the editor preferences.
 
 
We’ve mentioned JSlint-style static checks that Creator runs on your source code before. It’s now much easier to run them on the whole project: Clicking Tools->QmlJS->Run Checks will scan all projects’ qml and js files and report the results in the QML Analysis filter of the Build Issues tab. There are a couple of new checks as well.
QML and C++
When you’re writing a QML module or using QML from a C++ application you’ll often register new types with qmlRegisterType or expose some class instances with setContextProperty. Creator’s C++ code model now scans for these calls and tells the QML one about them. That way, the properties will show up in code completion and the static analyser won’t complain about unknown types.
However, since it only works when the source code is available, module authors still need to explicitly generate type information for QML modules with plugins before distributing it.
For feedback post here, on the Qt Creator mailing list or use the bug tracker.
Source Qt Labs Developer Blog

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.