This is an old revision of the document!


QML Filetype

QML files are not supported by geany currently how ever you can setup these rules to get some highlight in your code, however i have been experimenting with the ubuntu touch api rather than use the default qt creator application i wanted to use geany and have some highlighting and be able to test my programs.

First modify filetypes_extensions.conf likely located at ~/.config/geany/filedefs/filetypes_extensions.conf. Create this file if it does not exist. Next, add the below code to the file ( means existing data):

[Extensions]
...
QML=*.qml
...
 
[Groups]
...
Misc=QML
...

And create a new filedef named filetypes.QML.conf with the following contents:

filetypes.QML.conf
[styling]
default=default
number=number
string=string
word=word
identifier=identifier,bold
 
[keywords]
primary=true false null
 
[settings]
lexer_filetype=QML
extension=qml
comment_single=
 
[indentation]
width=2
# 0 is spaces, 1 is tabs, 2 is tab & spaces
type=0

Build Commands

In Geany, go to the Build menu and 'Set Build Commands…' and use qmlscene %f as the compile command, and ([^:]+):([0-9]+) as the Error Regular Expression.

Print/export