void fun(QmlApplicationViewer *viewer);
void fun(QmlApplicationViewer *viewer)
QObject *rootObject = viewer->rootObject(); Combo *com = new Combo(rootObject); nemoDB *nemo = new nemoDB(rootObject); return ;
Q_DECL_EXPORT int main(int argc, char *argv)
QApplication app(argc, argv);
but its giving me error that main.cpp:70: undefined reference to `Qml::fun(QmlApplicationViewer*)'
can we use QmlApplicationViewer like this i mean not in main.cpp in another class
and if we can whats is problem with this code..thanks
[Edit: Please be sure to add @ tags around your code -- mlong]
You are setting the definition in ABC.cpp wrongly Should be:
void Qml::fun(QmlApplicationViewer *viewer)
It should be possible, but is a very strange way of doing it. Why not modify the QmlApplicationViewer itself? You can do it in the constructor, or some other method... or write your own, simpler viewer (that's what I usually do, because the default is mostly for Symbian, and I don't need that code).
Also, please wrap your code in '@' tags, and make sure it's easily readable. Currently, it's hard to understand your point.
ohh thanks what a silly mistake...and by the way next time i will surely describe my point nicely
No problem, I'm just pointing out. It might help you get answers in the future.