extending qt creator - kdab · project configuration .user and .shared file xml files no tool for...
TRANSCRIPT
![Page 1: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/1.jpg)
Extending Qt Creator(without writing code)
Tobias Hunger
![Page 2: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/2.jpg)
![Page 3: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/3.jpg)
Configuration
![Page 4: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/4.jpg)
User configuration● ~/.config/QtProject/(QtCreator*|qtcreator/*)
● Can be changed by “-settingspath <path>” argument
● sqlite db + .ini file
● XML files (and more) in qtcreator subfolder
● Leave alone
● Possible exception: Sessions (*.qws)
Configuration
![Page 5: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/5.jpg)
System wide configuration● ../share/qtcreator/QtProject/*
● Same as above (without sqlite file)
● XML files, .ini-file
● Use sdktool to edit XML files
Configuration
![Page 6: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/6.jpg)
Project configuration
● .user and .shared file
● XML files
● No tool for .shared file, leave .user alone
● Do not check in .user files!
Configuration
![Page 7: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/7.jpg)
Built-in Tools
![Page 8: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/8.jpg)
Editors
Generic Highlighters
● Configure viaTools>Options>Text Editor>Generic Highlighter
● or by putting files into../share/qtcreator/generic-highlighter
![Page 9: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/9.jpg)
Editors
Macros
● Custom complex edit operations
● Configure via Tools>Macros
● No global configuration, user configuration in
.../QtProject/qtcreator/macros (binary files)
![Page 10: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/10.jpg)
Documentation
Custom Documentation
● Configure viaTools>Options>Help>Documentation
● or by putting[Help]InstalledDocumentation=/path/to/dir(Comma separated list of paths) into QtCreator.ini
![Page 11: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/11.jpg)
Debugger
● GDB/LLDB
Python code in shared/qtcreator/dumper/qttypes.py
or register own files inTools>Options>Debugger>GDB>Additional Startup Commands
– qtdump__type__name(d, value)
– qtedit__type__name(d, value)
● CDB
C++ code in src/libs/qtcreatorcdbext (Qt Creator sources!)
![Page 12: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/12.jpg)
Designer
● Designer plugins for custom widgets
Pitfall: Plugin needs to be built for Qt Creator,not for your project!
● Qml Designer offers similar feature for custom QML components
![Page 13: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/13.jpg)
Projects
● Custom Build-/Clean-/Deploy Steps
● Run Custom Executables
● Environment
● Variable Substitution:
– %{CurrentBuild:Name},
– %{CurrentProject:FilePath},
– %{CurrentDocument:Row},
– %{CurrentKit:Id},
... many more!
![Page 14: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/14.jpg)
External Tools
![Page 15: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/15.jpg)
External Tools
● Run stand-alone tools from Qt Creator
– Configure executable, arguments, stdin, etc.● Many variables available
– Output can be displayed or replace selected text or update the editor
● Edit using Tools>External>Configure...
● Drop files into share/qtcreator/externaltools
![Page 16: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/16.jpg)
Task Lists
● Import lists of “Build Issues” into Qt Creator
– Quickly navigate issues with F6/Shift-F6
● Watches file for changes
● file\tline\t(warning|error)\tmessage('\n' is expanded in message)
![Page 17: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/17.jpg)
Code Generation
![Page 18: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/18.jpg)
Snippets
Add custom code snippets, modify existing snippets to suit your needs
● add via Tools>Options>Text Editor>Snippets
● XML files in share/qtcreator/snippets
![Page 19: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/19.jpg)
Wizards
Create custom (sets of) files
● wizard.xml: Metadata + file list + description of UI fields
● Templates of other files to generate
Create subdirectory for your wizards in share/qtcreator/templates/wizards
![Page 20: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/20.jpg)
You need to do more?
![Page 21: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/21.jpg)
Qt Creator PluginDevelopment
Aurindam JanaTobias Hunger
![Page 22: Extending Qt Creator - KDAB · Project configuration .user and .shared file XML files No tool for .shared file, leave .user alone Do not check in .user files! Configuration](https://reader030.vdocuments.net/reader030/viewer/2022020318/5be5376f09d3f2f9648da018/html5/thumbnails/22.jpg)
Documentation
● Qt Creator Manual:http://qt-project.org/doc/qtcreator/index.html
● Extending Qt Creator Manual:http://doc-snapshot.qt-project.org/qtcreator-extending/extending-index.html
● Qt Creator mailing list:http://lists.qt-project.org/mailman/listinfo/qt-creator
● IRC:#qt-creator on freenode.net