hi,
i am beginner for qt...i have small doubt in qml ...i want to create simple database save and retrieve from gui...anyone please help me.....
hi,
i am beginner for qt...i have small doubt in qml ...i want to create simple database save and retrieve from gui...anyone please help me.....
In qml you have to use JavaScript for that as i know.
ganeshgladish (14th March 2013)
thank you for your replay sir,
can u please tell some examples code then i will understand ...please sir
In qt5 you can use a QObject and expose it into qml for that alsoin Qt4 the procedure is similar.
thank you for your reply,
please give tell example program or sites sir ...
First of all you can write your own c++ class from QObject. Do your work with database in this class. Then for using this class in qml you have to register it:
then in your qml, just import your custom type and use it.Qt Code:
qmlRegisterType<MyObject>("QtQuick", 1, 0, "MyObject");To copy to clipboard, switch view to plain text mode
see this: http://qt-project.org/doc/qt-5.0/qtq...roperties.html for embedding qobject in qml in Qt5
Bookmarks