[Interest] Qt Plugin Low Level API

Mitch Curtis mitch.curtis at digia.com
Fri May 23 10:02:34 CEST 2014


On 05/22/2014 09:58 AM, Tony Rietwyk wrote:
> Hi Etienne,
>
> The 4.8.5 doco for QObject.qobject_cast links to the "Plug & Paint"
> example for use of qobject_cast with interfaces.   Mind you, it
> incorrectly shows the return type as QWidget.  Hopefully that doco has
> been rewritten in v5!

Hoping won't get it fixed, as there's only so many people here. :p If 
you feel something should be fixed, please vote for the existing bug 
report, if any, or create a new one.

> Hope that helps,
>
> Tony
>
> *From:*interest-bounces+tony=rightsoft.com.au at qt-project.org
> [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] *On
> Behalf Of *Etienne Sandré-Chardonnal
> *Sent:* Thursday, 22 May 2014 5:37 PM
> *To:* interest at qt-project.org
> *Subject:* [Interest] Qt Plugin Low Level API
>
> Dear all,
>
> I'm reading the doc in order to implement plugins into my Qt 4.8
> application.
>
> The manual says that I need first to define the plugin interface as a
> pure virtual class. In the example it does not inherit QObject.
>
> Then it shows an example plugin implementation which inherits from
> QObject and the interface class (multiple inheritance)
>
> Then it says "use qobject_cast() to test whether a plugin implement a
> given interface". However, the qobject_cast page clearly says that the
> target class type must inherit QObject.
>
> I dit not try compiling an example yet, but how could this work?
> Shouldn't the interface inherit QObject, and the plugin implementation
> simply inherit the interface class?
>
> Thanks,
>
> Etienne
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



More information about the Interest mailing list