Modern Qt Development: The Top 10 Tools You Should Be Using
Published Friday October 12th, 2018
Leave a comment
Posted in Biz Circuit & Dev Loop, C++, QtCreator | Tags: apitrace, c++, Clang, Clazy, GammaRay, HotSpot, KDAB, opengl
Why is using the right tool for the job so important? Efficiency and results are two reasons that immediately spring to mind. You don’t see construction workers using shoes to drive in nails – so why as software developers do we so often make do with manual solutions to find bugs or optimize code? It’s certainly less efficient and much more frustrating, and the final results can be less than ideal.
It always takes time to learn a new tool – so how do you know where you should invest your time? We at KDAB would like to share our favourite Qt development tools that we think are worth the effort. We regularly rely on these tools to help us locate and fix troublesome bugs and solve difficult optimization challenges. If you live at the cutting edge of Qt development you may be familiar with many of these, but we know there’ll be something new for you regardless of your level of expertise.
GammaRay –introspection tool that adds Qt-awareness to the debugger
If you’ve been frustrated by debugging through endless Qt structure internals, you’ll definitely want to give this a try. GammaRay understands most of the core Qt components from a Qt perspective – QtQuick scene graphs, model/view structures, QTextDocuments, signal/slot activations, focus handling, GPU textures, QWidgets, state machines, and more – letting you observe and edit values at run-time in a natural way. You can debug applications from launch or attach to running apps (both local and remote).
- https://www.kdab.com/development-resources/qt-tools/gammaray/
- https://www.kdab.com/gammaray-2-9-0-release/
Clazy –compiler plug-in that understands Qt semantics
This is something that needs to be part of every Qt developer’s bag of tricks. By adding clazy to clang, you’ll get compile-time warnings for Qt best practices – unneeded memory allocations, misused APIs, or inefficient constructs. Clazy is a great way to improve your Qt code and best of all, it can provide automatic refactoring fixes for some of the errors it finds – no coding required!
- https://www.kdab.com/clazy-video/
- https://www.kdab.com/clazy-results-visualizer-qt/
- https://www.kdab.com/clazy-1-2-released/
Modern C++ – source code that uses C++11/14/17 improvements
Although C++11 and C++14 have been around for a while now, there are many old coding habits that die hard. Many developers don’t take advantage of newer C++ constructs that are more efficient, understandable, and maintainable. The thing is you don’t need to be a C++ standards expert to make small changes that can significantly help your code. We’ve got a few of the more important highlights covered in a paper below – or you can attend a training class or two for the real low-down.
Clang Tidy – compiler toolto help modernize your C++
This is the lazy person’s way to modernize C++. Another clang-based tool, Clang Tidy points out older C++ idioms that could use updating. It flags where these should be replaced with new C++11 or C++14 improvements, and in many cases can do the refactoring automatically. That’s productivity for you!
- https://www.kdab.com/clang-tidy-part-1-modernize-source-code-using-c11c14/
- https://www.kdab.com/clang-tidy-part-2-integrate-qmake-and-other-build-systems-using-bear/
HotSpot – tool to visualize your app’s CPU performance
When it comes to optimizing, nothing beats a profiler – but reading raw perf logs is a punishment that should only be reserved for people who believe zip files are a proper form of source control. HotSpot reads Linux perf logs and lets you see multiple different views (callers, timeline, top-down, bottom-up) to help you easily understand where you’re burning up your time.
- https://www.kdab.com/hotspot-video/
- https://www.kdab.com/hotspot-v1-1-0-adds-timeline-recording-features/
apitrace –set of tools to debug your graphics APIs and improve their performance
If you’re writing an app with a GUI, profiling doesn’t stop at your C++ code. You need a way to see the calls you’re making to OpenGL, Direct3D, or DirectDraw, view the contents of those calls in a graphical interpretation, and profile their performance. That’s exactly what apitrace does. It can also replay a trace file, allowing you to compare and benchmark performance once you’ve seen where to make improvements.
Kernel/System Profiler – tools for visualizing your operating system’s performance
Sometimes performance problems aren’t found in your app – they’re in multiple-process interactions, hidden in driver stacks, or a result of how you’re calling the operating system. For these kinds of really low-level debugging, you’ve got to have a system-profiling tool. It can feel like swatting a fly with a bazooka, but a system profiler is an incredibly invaluable tool that can find problems that nothing else will.
- Linux:
- QNX Neutrino:
Heaptrack – tooling to watch your app’s memory usage
Sometimes optimization isn’t about speed – it’s about memory. If you’re trying to profile yourapplication’s memory usage, you’ll want to check this out. By showing your application’s peak memory usage, memory leaking functions, biggest allocators, and most temporary allocations, you’ll be able to really narrow down where your app’s memory is going and how to keep it on a diet.
Continuous Integration (CI) – build systems for agile/XP development
Continuous integration fits hand-in-hand with unit testing as a methodology that can bring very real improvements to your software quality – whether you’re using agile development or not. Don’t bother creating your CI build system from scratch when there are a lot of great tools that can give you a leg up on delivering quality products.
Qt Creator – the Qt IDE
Perhaps you think it’s cheating to include Qt Creator in this list since it’s already installed on every Qt developer’s desktop. Yes, but did you know you can find slowspots in your Qt Quickcode through the built-in QML profiler? How about hitting Alt+Enter to get a list of all the refactoring options at the cursor location?What about other handykey sequences to find symbol references, do a git diff, or record a macro, along with many other super helpful navigation and editing aides? Shortcuts that you might use ten times a day if you only knew they were there. Don’t be a slave to your mouse – print out our handy reference card and pin it up on your cube wall.
- http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html
- http://doc.qt.io/qtcreator/creator-editor-refactoring.html
- https://www.kdab.com/development-resources/qtcreator/
Those are our top ten tools for improving your Qt development tool chest. Don’t forget there are also things that can’t be automated but for which there are courses and customized training – such as effective code reviews or best coding practices.
Is there anything else that you’ve found to be invaluable that you want to share? Please leave a suggestion in the comments!
http://blog.qt.io/blog/2018/10/12/modern-qt-development-top-10-tools-using/
Modern Qt Development: The Top 10 Tools You Should Be Using的更多相关文章
- Top 10 Free Wireless Network hacking/monitoring tools for ethical hackers and businesses
There are lots of free tools available online to get easy access to the WiFi networks intended to he ...
- Top 10 open source projects of 2015
Top 10 open source projects of 2015 Posted 15 Dec 2015Jen Wike Huger (Red Hat)Feed 188 up 31 comment ...
- TOP 10 BEST LINUX GAMES RELEASED IN 2016
Gaming on Linux used to be a very rare phrase. But since the arrival of Steam on Linux, the Linux ga ...
- SQL Server: Top 10 Secrets of a SQL Server Expert
转载自:http://technet.microsoft.com/en-us/magazine/gg299551.aspx Many companies have downsized their IT ...
- Top 10 Programming Fonts
Top 10 Programming Fonts Sunday, 17 May 2009 • Permalink Update: This post was written back in 2009, ...
- [转]Top 10 DTrace scripts for Mac OS X
org link: http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/ Top 10 DTra ...
- sql server top 10 IO性能查询
use master go ), ((case qs.statement_end_offset then datalength(qt.text) else qs.statement_end_offse ...
- OWASP top 10
OWASP Top 10 A1: InjectionSolution+Validate User Input+Never concatenate queries and date+Parameteri ...
- Top 10 Algorithms of 20th and 21st Century
Top 10 Algorithms of 20th and 21st Century MATH 595 (Section TTA) Fall 2014 TR 2:00 pm - 3:20 pm, Ro ...
随机推荐
- nginx下如何配置 ssl证书?腾讯云ssl证书为例!
nginx下如何配置 ssl证书?腾讯云ssl证书为例! 目前为止,https已经成为一种趋势,想要开启https就需要ssl证书. 首先,为域名注册ssl证书. 腾讯云注册地址:https://cl ...
- [转]深入理解/proc目录
Linux系统上的/proc目录是一种文件系统,即proc文件系统.与其它常见的文件系统不同的是,/proc是一种伪文件系统(也即虚拟文件系统),存储的是当前内核运行状态的一系列特殊文件,用户可以通过 ...
- 整合springboot,angular2,可以前后台交互数据
改造了一下angular2官方文档中的hero项目,让其可以进行后台的交互, https://github.com/DACHUYIN 源码在上面...博客就不写了....
- O-理解共享池
我们可以通过show sga命令查看共享池的整体组成部分: ....待截图.... 一.SGA内存结构 Oracle中SGA主要包括: 1.固定数据结构部分(FIXED Size) 2.数据块缓冲区( ...
- RAID技术简单分析
RAID技术解析 RAID:独立磁盘冗余阵列(Redundant Array of Independent Disks) RAID技术就是将许多块硬盘设备组合成一个容量更大.更安全的硬盘组,可以将数据 ...
- 06--Qt窗口布局
Qt窗口布局 标签: qtlayout 2012-05-05 07:56 3076人阅读 评论(0) 收藏 举报 分类: Qt开发(33) 版权声明:本文为博主原创文章,未经博主允许不得转载. 布 ...
- Web前端性能优化——提高页面加载速度
前言: 在同样的网络环境下,两个同样能满足你的需求的网站,一个“Duang”的一下就加载出来了,一个纠结了半天才出来,你会选择哪个?研究表明:用户最满意的打开网页时间是2-5秒,如果等待超过10秒, ...
- react 父组件调用子组件方法
import React from 'react'import '../page1/header.css'import { Table } from 'antd'import Child from ' ...
- Django - 一对多数据示例
1.增加Host -id 可以在模版中增加代码: 备注: 1.counter (从1开始) 2.counter0(从0开始) 3.revcounter(倒序) 4.revcounter0(倒序从0开始 ...
- 原始js表单文本框初始化获取焦点和选中
发现: 1 使用dom对象.focus() 放在 window.onload 时可以 让这个DOM对象获取焦点. 2 使用DOM对象.select() 可以选中文本框中的文字. 3 不要加上on , ...