[Interest] Heavily Commented Example: Simple Single Frontend with Two BackendsLow,
thiago.macieira at intel.com
Fri Oct 26 16:59:47 CEST 2012
On sexta-feira, 26 de outubro de 2012 07.42.01, d3fault wrote:
> Weird, I thought all QObject derived classes required the Q_OBJECT
> macro. What are the exact requirements for this? Only if you use
> signals/slots in the derived class?
Yes. You need it if you use the features provided by the meta object, which
- other Q_INVOKABLE
- any access to metaObject(), including registering in QtDBus, QML, QtScript,
Starting in Qt 5, things change a little. Due to the new connection mechanism,
you do not need Q_OBJECT to connect an existing signal to anything. That means
you can use existing Qt classes without using moc in your application,
provided you do use the new mechanism.
However, Qt plugins now require Q_OBJECT because moc generates some extra data
that QPluginLoader needs to find.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Interest