Yes, this works fine if there is a simple function. But now I'm going to use the "colors" variable in another function and i have an error because this function cannot "see" this variable.
So I put in my .h file the definition of the "colors" variable like this: QList<QColor *> colors; (¿is this ok?)
and I'm going to initialize theirs values in .cpp file with this
colors << QColor(0,0,0) << QColor(255,255,255) << ...
but this not work because the << operator don't work with pointers (I think).
How can i fill the values of colors?
Bookmarks