[Qt-embedded-interest] Graphics Driver

Tom Cooksey thomas.cooksey at nokia.com
Fri Jul 10 17:17:00 CEST 2009


> Qt list,
>
>      I seem to have a reoccuring problem when compiling the QImage
> (it happened before when I was playing around with the driver).  I
> am not sure but it seems to have something to do with the "new"
> function which if my research is correct is much like malloc in C. 
> I am still fairly new to C++ (but came from a decent background in
> C) so it may be an easy fix.  When compiling I get the following
> error:
>
> vopuScreenDriver.cpp: In member function 'bool
> vopuScreenDriver::connect()': vopuScreenDriver.cpp:37: error:
> invalid conversion from 'QImage*' to 'int'

gcc is giving you a pretty big hint here! :-) vopuimage's type is int 
and you're trying to assign a QImage* to it. As C++ (and C) is type-
safe, this is a compiler error. Try making vopuimage a QImage*.

Cheers,

Tom




More information about the Qt-embedded-interest mailing list