Extending Qt Creator (without writing code) Tobias Hunger - - PowerPoint PPT Presentation

extending qt creator
SMART_READER_LITE
LIVE PREVIEW

Extending Qt Creator (without writing code) Tobias Hunger - - PowerPoint PPT Presentation

Extending Qt Creator (without writing code) Tobias Hunger Confjguration Confjguration User confjguration ~/.config/QtProject/(QtCreator*|qtcreator/*) Can be changed by -settingspath <path> argument sqlite db + .ini


slide-1
SLIDE 1

Extending Qt Creator

(without writing code)

Tobias Hunger

slide-2
SLIDE 2
slide-3
SLIDE 3

Confjguration

slide-4
SLIDE 4

User confjguration

  • ~/.config/QtProject/(QtCreator*|qtcreator/*)
  • Can be changed by “-settingspath <path>” argument
  • sqlite db + .ini fjle
  • XML fjles (and more) in qtcreator subfolder
  • Leave alone
  • Possible exception: Sessions (*.qws)

Confjguration

slide-5
SLIDE 5

System wide confjguration

  • ../share/qtcreator/QtProject/*
  • Same as above (without sqlite fjle)
  • XML fjles, .ini-fjle
  • Use sdktool to edit XML fjles

Confjguration

slide-6
SLIDE 6

Project confjguration

  • .user and .shared fjle
  • XML fjles
  • No tool for .shared fjle, leave .user alone
  • Do not check in .user fjles!

Confjguration

slide-7
SLIDE 7

Built-in Tools

slide-8
SLIDE 8

Editors

Generic Highlighters

  • Confjgure via

Tools>Options> Text Editor> Generic Highlighter

  • or by putting fjles into

../share/qtcreator/ generic-highlighter

slide-9
SLIDE 9

Editors

Macros

  • Custom complex edit operations
  • Confjgure via Tools>Macros
  • No global confjguration, user confjguration in

.../QtProject/qtcreator/macros (binary fjles)

slide-10
SLIDE 10

Documentation

Custom Documentation

  • Confjgure via

Tools>Options> Help>Documentation

  • or by putting

[Help] InstalledDocumentation=/path/to/dir (Comma separated list of paths) into QtCreator.ini

slide-11
SLIDE 11

Debugger

  • GDB/LLDB

Python code in shared/qtcreator/dumper/qttypes.py

  • r register own fjles in

Tools>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!)

slide-12
SLIDE 12

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

slide-13
SLIDE 13

Projects

  • Custom Build-/Clean-/Deploy Steps
  • Run Custom Executables
  • Environment
  • Variable Substitution:

– %{CurrentBuild:Name}, – %{CurrentProject:FilePath}, – %{CurrentDocument:Row}, – %{CurrentKit:Id},

... many more!

slide-14
SLIDE 14

External Tools

slide-15
SLIDE 15

External Tools

  • Run stand-alone tools from Qt Creator

– Confjgure 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 fjles into

share/qtcreator/externaltools

slide-16
SLIDE 16

Task Lists

  • Import lists of “Build Issues” into Qt Creator

– Quickly navigate issues with F6/Shift-F6

  • Watches fjle for changes
  • file\tline\t(warning|error)\tmessage

('\n' is expanded in message)

slide-17
SLIDE 17

Code Generation

slide-18
SLIDE 18

Snippets

Add custom code snippets, modify existing snippets to suit your needs

  • add via Tools>Options>Text

Editor>Snippets

  • XML fjles in share/qtcreator/snippets
slide-19
SLIDE 19

Wizards

Create custom (sets of) fjles

  • wizard.xml: Metadata + fjle list + description of UI

fjelds

  • Templates of other fjles to generate

Create subdirectory for your wizards in share/qtcreator/templates/wizards

slide-20
SLIDE 20

You need to do more?

slide-21
SLIDE 21

Qt Creator Plugin Development

Aurindam Jana Tobias Hunger

slide-22
SLIDE 22

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

slide-23
SLIDE 23

Thank you!

tobias.hunger@digia.com hunger on IRC (freenode.net)