aboutsummaryrefslogtreecommitdiff
path: root/examples/README
blob: ab683f3b6a8a65782099611097dc0b0d72d4b76f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This directory contains examples that demonstrate how to use the QMenuModel
binding in Qt and QML applications.


To export an example menu model on the bus, run 'exportmenu.py'.


To render this menu in a QML application, run 'render-menumodel.qml' in
qmlscene. You will need to inform qmlscene of the location of the QMenuModel
plugin if it’s not installed system-wide, e.g.:

    $ qmlscene -I libqmenumodel examples/render-menumodel.qml


To compile a C++ executable that uses libqmenumodel to monitor and print
information about the exported menu, run `cmake` and then `make` from this
directory. This assumes that libqmenumodel-dev is installed on the system
(it won’t work with a local copy). Then, run the executable generated:

    $ cmake .
    $ make
    $ ./info-menumodel