[Interest] QML passing qobject in function call

Weng Xuetian wengxt at gmail.com
Sun Dec 23 02:16:19 CET 2012


Hello,
Here is my situation, I'm using a qml library, and it provides a declartive
class A, which is a subclass type B. (A is registered as uncreatable qml
type,

I need this object to be passed to a function of exported c++ qobject, what
prototype of the c++ function should I choose to let this object of type A
to be passed?

I tried
void function(const QObject*)
or
void function(const B*)

The problem is that A is not a public class.


(Do I need to register QObject/B as qml type?)

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121222/71315239/attachment.html>


More information about the Interest mailing list