[Qt-interest] Compile error for QList<T> containing pointer to objects of my own class

Duane Hebert spoo at flarn.com
Mon Jan 4 22:17:19 CET 2010


"Pedro Santos" <nonspam2048 at yahoo.de> wrote in message news:hhtjnk$enl$1 at eple.troll.no...
> Am 04.01.2010 20:46, schrieb Duane Hebert:
> 
>> _listAllScripts is a Qlist<Script*>, not a pointer so you can't assign
>> it to something
>> created by new().
> 
> Oh, thanks. I see that was a stupid error the error message has confused me,
> to think more complicated ;-)
No Problem.

>> BTW, you should not use leading _ in your variable names as _ and __ are
>> reserved.
> 
> Ok, I will change that.

Technically, using a single underscore and a lower case letter can be ok if it's not in global
namespace. 
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=185

but it's simpler to not do it at all.



More information about the Qt-interest-old mailing list