QPointer is a template class and therefore can't be used by itself, i.e.
without specifying the template parameter.

In your case you should either:
1) specify a particular QObject-related class in the
declaration/definition of myFunction(), e.g.
   void myFunction (QPointer<QWidget>* myPointer)
   {
       // do something
   }
2) define myFunction() as a template function, e.g.
   template <class T>
   void myFunction (QPointer<T>* myPointer)
   {
       // do something
   }

On 01/13/2015 06:13 AM, Guenther Boelter wrote:
> 
> Sorrry,
> 
> I have a 'small' problem and my timeline is running so fast ...
> 
> How can I use QPointer as an argument? A simple
> 
> 
> void myFunction( QPointer *myPointer )
> {
>     // do something
> }
> 
> myFunction( myPointer );
> 
> 
> returns 'error: ‘QPointer’ is not a type'.
> 
> 
> Thanks in advance and best regards
> 
> Guenther

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to