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.....
Printable View
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.
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 also :) in 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.Code:
qmlRegisterType<MyObject>("QtQuick", 1, 0, "MyObject");
see this: http://qt-project.org/doc/qt-5.0/qtq...roperties.html for embedding qobject in qml in Qt5