QTransform method is private within this context error
Hello,
I have
Code:
perspectiveMatrix->reset();
perspectiveMatrix->scale(0,45);
phone->setTransform(perspectiveMatrix);
I get an error for line 4:
Quote:
'QTransform::QTransform(bool)' is private within this context
Reading other discussions about this problem I figured the error is referring to the copy constructor of QTransform being used.
I use Nokia SDK 1.2 on Mac OS X Lion.
Is this probably an error in Qt itself or what's a solution?
The variables are pointers of their used type (i.e.. phone is a QGraphicsPixmapItem pointer).
There being more than one Qt resource on the web, what's the best place to ask such questions? Is the developer.nokia.com Forum now recommended?
Re: QTransform method is private within this context error
setTransform() expects an object and not a pointer. Allocate your QTransform object on the stack (aka not using "new") and all will be fine.
Re: QTransform method is private within this context error
This solved it. The documentation writes an & before the argument thus I thought it requires a pointer but wait & is the reference operator in arguments in C++, thus an object was expected. & only yields an address. Oh my C++ is rusty.
Thank you.