creating a sharp weapon qt Creator: The use of code TODO tools
Preface
as the saying goes, 工欲善其事 its prerequisite. Working life, can have an excellent easy-to-use, efficient and simple tool, to improve efficiency, achieve value has a great impact.
Qt is a set of C + + libraries, encapsulating a number of useful modules and features, with advanced GUI design components, open source suite, to achieve enterprise-class applications. Qt Creator is the IDE with the QT itself, which is lightweight and efficient, although it is not comparable to the heavyweight visual Studio.
This article describes how to use the Code todo tool in QT Creator to improve efficiency by using this gadget to write code like a story. Operation Method
first, it is necessary to properly install the QT and QT Creator development environment on the local computer.
then, open the QT Creator IDE, "Help" on the menu bar, click on the "About plugins" option, and check the "Todo" plugin in the list of Plug-ins, as shown in the following figure, confirm and then restart the IDE.
turn on QT Creator again, click on the menu bar "Tools", "Options", you can see that there is a "To-Do" in the setting, as shown in the following illustration:
The to-do option has the "keywords" list, "Scan range" setting. The default list of keywords is generally enough for us to use, of course, can also add custom keywords, keywords to be in English form, currently does not support Chinese. Scan range, there is a scan for the entire project, there is a scan for the current page, please set as needed.
when the setup is complete, start writing our little Story (coding), write a little story, and use the To-do tool to add small notes. The form is shown in the following illustration:
can see that the "TODO" keyword in the comment corresponds to the to-do item, the icon is green; "Note" keyword corresponds to a record, the icon is blue exclamation mark; "WARNING" keyword corresponding to a warning, the icon for the yellow triangle, "fixeme" keyword corresponding to a correction, the icon for the red triangle; The "bug" keyword corresponds to a bug, and the icon is an insect.
So far, to-do common functions have been achieved, the process of coding, while writing side annotation, on the one hand, can improve the readability of the code, on the other hand, for the problems and issues in the code, but also to the effect of their own glance.