Akcije
Podrška #20241
Zatvorenqml qt 4.7 beta, qt quick
Početak:
06.05.2010
Završetak:
% završeno:
0%
Procjena vremena:
Fajlovi
Povezani tiketi 1 (0 otvoreno — 1 zatvoren)
Izmjenjeno od Ernad Husremović prije oko 15 godina
- Naslov promijenjeno iz qml qt 4.7 beta u qml qt 4.7 beta, qt quick
Izmjenjeno od Ernad Husremović prije oko 15 godina
- Fajl attachment.zip attachment.zip dodano
http://lists.trolltech.com/pipermail/qt-qml/2010-April/000097.html
attached is a small example button.zip which demonstrates how to create a C++ plugin which can be used fom qml. The plugin implements a native type called NativeBackend which implements a C++ function called nativeFunction(). An instance of NativeBackend is instantiated declaratively in Button.qml. Unzip, cd to button, call qmake, make and run it with qml Button.qml. Clicking on the text label will change the text to the return value of the native function. The file qmldir has to live in the same directory as Button.qml. The engine parses it automatically when loading Button.qml. The files contains the single line "plugin nativebackend lib" which makes the engine expect a plugin binary in the lib subdirectory. If you run qml with QML_IMPORT_TRACE=1 you will also get debug output from the import loading mechanism: ~/tmp/button$ QML_IMPORT_TRACE=1 qml Button.qml
Izmjenjeno od Ernad Husremović prije skoro 15 godina
- Status promijenjeno iz Dodijeljeno u Zatvoreno
Akcije